Skip to content

class Crystal::Macros::RangeLiteral
inherits Crystal::Macros::ASTNode

A range literal.

Methods

#begin : ASTNode

Similar to Range#begin

View source

#each(&) : Nil

Similar to Range#each

View source

#end : ASTNode

Similar to Range#end

View source

#excludes_end? : ASTNode

Similar to Range#excludes_end?

View source

#map(&) : ArrayLiteral

Similar to Enumerable#map for a Range. Only works on ranges of NumberLiterals considered as integers.

View source

#to_a : ArrayLiteral

Similar to Enumerable#to_a for a Range. Only works on ranges of NumberLiterals considered as integers.

View source