Class: Rubasteme::AST::CondRecipientClauseNode
- Inherits:
-
RecipientClauseBaseNode
- Object
- Node
- BranchNode
- ListNode
- RecipientClauseBaseNode
- Rubasteme::AST::CondRecipientClauseNode
- Defined in:
- lib/rubasteme/ast/branch_node.rb
Instance Method Summary collapse
-
#initialize(_ = nil) ⇒ CondRecipientClauseNode
constructor
A new instance of CondRecipientClauseNode.
- #test ⇒ Object
- #test=(node) ⇒ Object
Methods inherited from RecipientClauseBaseNode
Methods inherited from ListNode
#elements, #empty?, #first, #rest
Methods inherited from BranchNode
#<<, #[], #[]=, #each, #size, #to_a
Methods inherited from Node
Constructor Details
#initialize(_ = nil) ⇒ CondRecipientClauseNode
Returns a new instance of CondRecipientClauseNode.
341 342 343 344 345 |
# File 'lib/rubasteme/ast/branch_node.rb', line 341 def initialize(_ = nil) # <cond clause> -> ( <test> => <recipient> ) # @nodes = [<test>, <recipient>] super(2, 1, _) end |
Instance Method Details
#test ⇒ Object
347 348 349 |
# File 'lib/rubasteme/ast/branch_node.rb', line 347 def test @nodes[0] end |
#test=(node) ⇒ Object
351 352 353 |
# File 'lib/rubasteme/ast/branch_node.rb', line 351 def test=(node) @nodes[0] = node end |