class Macros::ArrayLiteral

Overview

An array literal.

Superclass hierarchy

Object
Reference
Macros::ASTNode
Macros::ArrayLiteral

Defined in:

Instance Method Summary

Instance Method Detail

def [](index : NumberLiteral) : ASTNode

Similar to Array#[], but returns NilLiteral on out of bounds.


def all?(&block) : BoolLiteral

Similar to Enumerable#all?


def any?(&block) : BoolLiteral

Similar to Enumerable#any?


def argify : MacroId

Returns a MacroId with all of this array's elements joined by commas.


def empty? : BoolLiteral

Similar to Array#empty?


def find(&block) : ASTNode | NilLiteral

Similar to Enumerable#find


def first : ASTNode | NilLiteral

Similar to Array#first, but returns a NilLiteral if the array is empty.


def join(separator) : StringLiteral

Similar to Enumerable#join


def last : ASTNode | NilLiteral

Similar to Array#last, but returns a NilLiteral if the array is empty.


def length : NumberLiteral

Similar to Array#length


def map(&block) : ArrayLiteral

Similar to Enumerable#map


def select(&block) : ArrayLiteral

Similar to Enumerable#select


def shuffle : ArrayLiteral

Similar to Array#shuffle


def sort : ArrayLiteral

Similar to Array#sort


def uniq : ArrayLiteral

Similar to Array#uniq