class BELParser::Parsers::AST::Subject

AST node representing the subject of a statement.

Public Class Methods

new(children = [], properties = {}) click to toggle source

New Subject AST node.

@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 790
def initialize(children = [], properties = {})
  super(Subject.ast_type, children, properties)
end

Public Instance Methods

term() click to toggle source

Get the subject's term.

# File lib/bel_parser/parsers/ast/node.rb, line 795
def term
  children[0]
end