Class: Node
- Inherits:
-
Object
- Object
- Node
- Defined in:
- lib/openehr/parser/opt_parser.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(parent = nil) ⇒ Node
constructor
A new instance of Node.
- #root? ⇒ Boolean
Constructor Details
#initialize(parent = nil) ⇒ Node
Returns a new instance of Node.
606 607 608 609 |
# File 'lib/openehr/parser/opt_parser.rb', line 606 def initialize(parent = nil) @parent = parent @path = '/' if parent.nil? end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
603 604 605 |
# File 'lib/openehr/parser/opt_parser.rb', line 603 def id @id end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
604 605 606 |
# File 'lib/openehr/parser/opt_parser.rb', line 604 def parent @parent end |
#path ⇒ Object
Returns the value of attribute path.
603 604 605 |
# File 'lib/openehr/parser/opt_parser.rb', line 603 def path @path end |
Instance Method Details
#root? ⇒ Boolean
611 612 613 |
# File 'lib/openehr/parser/opt_parser.rb', line 611 def root? parent.nil? end |