Class: RSpock::AST::WhenBlock
- Defined in:
- lib/rspock/ast/when_block.rb
Instance Attribute Summary
Attributes inherited from Block
Instance Method Summary collapse
-
#initialize(node) ⇒ WhenBlock
constructor
A new instance of WhenBlock.
- #successors ⇒ Object
Methods inherited from Block
#<<, #children, #node_container=, #node_container?, #range, #succession_error_msg, #unshift, #valid_successor?
Constructor Details
#initialize(node) ⇒ WhenBlock
Returns a new instance of WhenBlock.
7 8 9 |
# File 'lib/rspock/ast/when_block.rb', line 7 def initialize(node) super(:When, node) end |
Instance Method Details
#successors ⇒ Object
11 12 13 |
# File 'lib/rspock/ast/when_block.rb', line 11 def successors @successors ||= [:Then].freeze end |