Class: Rubasteme::AST::CaseClauseNode
- Inherits:
-
HoldingSequenceBaseNode
- Object
- Node
- BranchNode
- ListNode
- HoldingSequenceBaseNode
- Rubasteme::AST::CaseClauseNode
- Defined in:
- lib/rubasteme/ast/branch_node.rb
Instance Method Summary collapse
- #data ⇒ Object
- #data=(node) ⇒ Object
-
#initialize(_ = nil) ⇒ CaseClauseNode
constructor
A new instance of CaseClauseNode.
Methods inherited from HoldingSequenceBaseNode
Methods inherited from ListNode
#elements, #empty?, #first, #rest
Methods inherited from BranchNode
#<<, #[], #[]=, #each, #size, #to_a
Methods inherited from Node
Constructor Details
#initialize(_ = nil) ⇒ CaseClauseNode
Returns a new instance of CaseClauseNode.
387 388 389 390 |
# File 'lib/rubasteme/ast/branch_node.rb', line 387 def initialize(_ = nil) # @nodes = [<data>, <sequence>] super(2, 1, _) end |
Instance Method Details
#data ⇒ Object
392 393 394 |
# File 'lib/rubasteme/ast/branch_node.rb', line 392 def data @nodes[0] end |
#data=(node) ⇒ Object
396 397 398 |
# File 'lib/rubasteme/ast/branch_node.rb', line 396 def data=(node) @nodes[0] = node end |