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