Instance methods
*(other : NumberLiteral) : ArrayLiteral
Source+(other : ArrayLiteral) : ArrayLiteral
Source-(other : ArrayLiteral) : ArrayLiteral
Source<<(value : ASTNode) : ArrayLiteral
Source[](start : NumberLiteral, count : NumberLiteral) : ArrayLiteral(ASTNode) | NilLiteral
Similar to Array#[]?(Int, Int).
Source[](index : NumberLiteral) : ASTNode
Similar to Array#[]?(Int).
Source[](index : RangeLiteral) : ArrayLiteral(ASTNode) | NilLiteral
Similar to Array#[]?(Range).
Source[]=(index : NumberLiteral, value : ASTNode) : ASTNode
Sourceall?
Similar to Enumerable#all?
Sourceany?
Similar to Enumerable#any?
Sourceeach_with_index
Similar to Enumerable#each_with_index
Sourcefind
Similar to Enumerable#find
Sourcefirst
Similar to Array#first, but returns a NilLiteral if the array is empty.
Sourceincludes?(node : ASTNode) : BoolLiteral
Similar to Enumerable#includes?(obj).
Sourcejoin(separator) : StringLiteral
Similar to Enumerable#join
Sourcelast
Similar to Array#last, but returns a NilLiteral if the array is empty.
Sourcemap
Similar to Enumerable#map
Sourcemap_with_index
Similar to Enumerable#map_with_index
Sourceof
Returns the type specified at the end of the array literal, if any.
This refers to the part after brackets in [] of String.
Sourcepush(value : ASTNode) : ArrayLiteral
Sourcereduce(memo : ASTNode, &) : ASTNode
Similar to Enumerable#reduce
Sourcereduce
Similar to Enumerable#reduce
Sourcereject
Similar to Enumerable#reject
Sourceselect
Similar to Enumerable#select
Sourcesplat(trailing_string : StringLiteral = nil) : MacroId
Returns a MacroId with all of this array's elements joined
by commas.
If trailing_string is given, it will be appended to
the result unless this array is empty. This lets you
splat an array and optionally write a trailing comma
if needed.
Sourcetype
Returns the type that receives the items of the array.
This refers to the part before brackets in MyArray{1, 2, 3}
Sourceunshift(value : ASTNode) : ArrayLiteral
Similar to Array#unshift.
Source