Class: Rubinius::AST::Match3

Inherits:
Node
  • Object
show all
Defined in:
lib/compiler/ast/control_flow.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk

Constructor Details

#initialize(line, pattern, value) ⇒ Match3

Returns a new instance of Match3.



206
207
208
209
210
# File 'lib/compiler/ast/control_flow.rb', line 206

def initialize(line, pattern, value)
  @line = line
  @pattern = pattern
  @value = value
end

Instance Attribute Details

#patternObject

Returns the value of attribute pattern.



204
205
206
# File 'lib/compiler/ast/control_flow.rb', line 204

def pattern
  @pattern
end

#valueObject

Returns the value of attribute value.



204
205
206
# File 'lib/compiler/ast/control_flow.rb', line 204

def value
  @value
end

Instance Method Details

#to_sexpObject



212
213
214
# File 'lib/compiler/ast/control_flow.rb', line 212

def to_sexp
  [:match3, @pattern.to_sexp, @value.to_sexp]
end