Class: RSpock::AST::GivenBlock

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

Instance Attribute Summary

Attributes inherited from Block

#node, #type

Instance Method Summary collapse

Methods inherited from Block

#<<, #children, #node_container=, #node_container?, #range, #succession_error_msg, #unshift, #valid_successor?

Constructor Details

#initialize(node) ⇒ GivenBlock

Returns a new instance of GivenBlock.



7
8
9
# File 'lib/rspock/ast/given_block.rb', line 7

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

Instance Method Details

#successorsObject



11
12
13
# File 'lib/rspock/ast/given_block.rb', line 11

def successors
  @successors ||= [:When, :Expect].freeze
end