Class: Red::LiteralNode::Range

Inherits:
Red::LiteralNode show all
Defined in:
lib/red/nodes/literal_nodes.rb

Overview

:nodoc:

Direct Known Subclasses

Exclusive

Defined Under Namespace

Classes: Exclusive

Instance Method Summary collapse

Methods inherited from String

#%, #*, #+, #<<, #<=>, #==, #=~, #[], #[]=, #capitalize, #capitalize!, #casecmp, #center, #chomp, #chomp!, #chop, #chop!, #concat, #count, #crypt, #delete, #delete!, #downcase, #downcase!, #each, #each_byte, #each_line, #empty?, #eql?, #gsub, #gsub!, #hash, #hex, #include?, #index, #insert, #inspect, #intern, #length, #ljust, #lstrip, #lstrip!, #match, #next, #next!, #oct, #replace, #reverse, #reverse!, #rindex, #rjust, #rstrip, #rstrip!, #scan, #size, #slice, #slice!, #split, #squeeze, #strip, #strip!, #strip_scripts, #sub, #sub!, #succ, #succ!, #sum, #swapcase, #swapcase!, #to_f, #to_i, #to_s, #to_str, #to_sym, #tr, #tr!, #tr_s, #tr_s!, #upcase, #upcase!, #upto

Constructor Details

#initialize(start_sexp, finish_sexp, options) ⇒ Range

:dot2, expression, expression


72
73
74
75
76
# File 'lib/red/nodes/literal_nodes.rb', line 72

def initialize(start_sexp, finish_sexp, options)
  start  = start_sexp.red!(:as_argument => true)
  finish = finish_sexp.red!(:as_argument => true)
  self << "c$Range.m$new(%s,%s,false)" % [start, finish]
end