class BELParser::Parsers::AST::Argument

AST node representing an argument.

Public Class Methods

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

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

Public Instance Methods

child() click to toggle source

Get the {Parameter} or {Term} child.

# File lib/bel_parser/parsers/ast/node.rb, line 547
def child
  children[0]
end
parameter?() click to toggle source

Does the argument have a {Parameter} child?

# File lib/bel_parser/parsers/ast/node.rb, line 537
def parameter?
  children[0].is_a?(Parameter)
end
term?() click to toggle source

Does the argument have a {Term} child?

# File lib/bel_parser/parsers/ast/node.rb, line 542
def term?
  children[0].is_a?(Term)
end