Class: BELParser::Parsers::AST::NamespaceDefinition
- Defined in:
- lib/bel_parser/parsers/ast/node.rb
Overview
AST node representing the definition of a namespace.
Instance Attribute Summary collapse
-
#uri ⇒ Object
Get/Set the uri property.
Attributes inherited from Node
#character_range, #complete, #line_number
Attributes inherited from AST::Node
Instance Method Summary collapse
-
#domain ⇒ Object
Get the namespace definition’s domain.
-
#initialize(children = [], properties = {}) ⇒ NamespaceDefinition
constructor
New NamespaceDefinition AST node.
-
#keyword ⇒ Object
Get the namespace definition’s keyword.
Methods inherited from Node
#add_syntax_error, #append, #child, #children?, #complete?, #concat, #first_child, #fourth_child, #freeze, #incomplete?, #num_children, #range_end, #range_start, #second_child, #syntax_errors, #third_child, #traverse, #updated
Methods inherited from AST::Node
#==, #append, #concat, #dup, #eql?, #inspect, #to_a, #to_ast, #to_sexp, #updated
Constructor Details
#initialize(children = [], properties = {}) ⇒ NamespaceDefinition
New NamespaceDefinition AST node.
310 311 312 |
# File 'lib/bel_parser/parsers/ast/node.rb', line 310 def initialize(children = [], properties = {}) super(NamespaceDefinition.ast_type, children, properties) end |
Instance Attribute Details
#uri ⇒ Object
Get/Set the uri property.
325 326 327 |
# File 'lib/bel_parser/parsers/ast/node.rb', line 325 def uri @uri end |
Instance Method Details
#domain ⇒ Object
Get the namespace definition’s domain.
320 321 322 |
# File 'lib/bel_parser/parsers/ast/node.rb', line 320 def domain children[1] end |
#keyword ⇒ Object
Get the namespace definition’s keyword.
315 316 317 |
# File 'lib/bel_parser/parsers/ast/node.rb', line 315 def keyword children[0] end |