Class: RSpock::AST::Parser::CleanupBlock

Inherits:
Block
  • Object
show all
Defined in:
lib/rspock/ast/parser/cleanup_block.rb

Instance Attribute Summary

Attributes inherited from Block

#node, #type

Instance Method Summary collapse

Methods inherited from Block

#<<, #can_start?, #children, #range, #succession_error_msg, #to_rspock_node, #valid_successor?

Constructor Details

#initialize(node) ⇒ CleanupBlock

Returns a new instance of CleanupBlock.



8
9
10
# File 'lib/rspock/ast/parser/cleanup_block.rb', line 8

def initialize(node)
  super(:Cleanup, node)
end

Instance Method Details

#can_end?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/rspock/ast/parser/cleanup_block.rb', line 12

def can_end?
  true
end

#successorsObject



16
17
18
# File 'lib/rspock/ast/parser/cleanup_block.rb', line 16

def successors
  @successors ||= [:Where].freeze
end