Class: RSpock::AST::WhereBlock

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

Defined Under Namespace

Classes: MalformedError

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) ⇒ WhereBlock

Returns a new instance of WhereBlock.



9
10
11
# File 'lib/rspock/ast/where_block.rb', line 9

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

Instance Method Details

#dataObject



17
18
19
# File 'lib/rspock/ast/where_block.rb', line 17

def data
  @data ||= parse_data
end

#headerObject



13
14
15
# File 'lib/rspock/ast/where_block.rb', line 13

def header
  @header ||= parse_header
end

#successorsObject



21
22
23
# File 'lib/rspock/ast/where_block.rb', line 21

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