Class: Rubasteme::AST::CaseRecipientClauseNode

Inherits:
RecipientClauseBaseNode show all
Defined in:
lib/rubasteme/ast/branch_node.rb

Instance Method Summary collapse

Methods inherited from RecipientClauseBaseNode

#recipient, #recipient=

Methods inherited from ListNode

#elements, #empty?, #first, #rest

Methods inherited from BranchNode

#<<, #[], #[]=, #each, #size, #to_a

Methods inherited from Node

#to_a, #to_s, #type

Constructor Details

#initialize(_ = nil) ⇒ CaseRecipientClauseNode

Returns a new instance of CaseRecipientClauseNode.



409
410
411
412
413
# File 'lib/rubasteme/ast/branch_node.rb', line 409

def initialize(_ = nil)
  # ( ( <datum>* ) => <recipient> )
  # @nodes = [<data>, <recipient>]
  super(2, 1, _)
end

Instance Method Details

#dataObject



415
416
417
# File 'lib/rubasteme/ast/branch_node.rb', line 415

def data
  @nodes[0]
end

#data=(node) ⇒ Object



419
420
421
# File 'lib/rubasteme/ast/branch_node.rb', line 419

def data=(node)
  @nodes[0] = node
end