class BELParser::Parsers::AST::Object
AST
node representing the object of a statement.
Public Class Methods
new(children = [], properties = {})
click to toggle source
@see Node#initialize Node
class for basic properties
Calls superclass method
BELParser::Parsers::AST::Node::new
# File lib/bel_parser/parsers/ast/node.rb, line 810 def initialize(children = [], properties = {}) super(Object.ast_type, children, properties) end
Public Instance Methods
child()
click to toggle source
Get the {Term} or {Statement} child.
# File lib/bel_parser/parsers/ast/node.rb, line 825 def child children[0] end
statement?()
click to toggle source
Does the object have a {Statement} child?
# File lib/bel_parser/parsers/ast/node.rb, line 820 def statement? children[0].is_a?(Statement) end
term?()
click to toggle source
Does the object have a {Term} child?
# File lib/bel_parser/parsers/ast/node.rb, line 815 def term? children[0].is_a?(Term) end