Class: RSpock::AST::WhereNode

Inherits:
ASTTransform::Node
  • Object
show all
Defined in:
lib/rspock/ast/node.rb

Instance Method Summary collapse

Instance Method Details

#data_rowsObject



57
58
59
60
61
# File 'lib/rspock/ast/node.rb', line 57

def data_rows
  children
    .select { |n| n.type == :array }
    .map(&:children)
end

#headerObject



52
53
54
55
# File 'lib/rspock/ast/node.rb', line 52

def header
  header_node = children.find { |n| n.type == :rspock_where_header }
  header_node.children.map { |sym_node| sym_node.children[0] }
end