Class: OpenEHR::Parser::CADL::ArchetypeNode
- Inherits:
-
Object
- Object
- OpenEHR::Parser::CADL::ArchetypeNode
- Defined in:
- lib/open_ehr/parser/cadl_node.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) ⇒ ArchetypeNode
constructor
A new instance of ArchetypeNode.
- #root? ⇒ Boolean
Constructor Details
#initialize(parent = nil) ⇒ ArchetypeNode
Returns a new instance of ArchetypeNode.
8 9 10 11 |
# File 'lib/open_ehr/parser/cadl_node.rb', line 8 def initialize(parent = nil) @parent = parent @path = '/' if parent.nil? end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/open_ehr/parser/cadl_node.rb', line 6 def id @id end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
5 6 7 |
# File 'lib/open_ehr/parser/cadl_node.rb', line 5 def parent @parent end |
#path ⇒ Object
Returns the value of attribute path.
6 7 8 |
# File 'lib/open_ehr/parser/cadl_node.rb', line 6 def path @path end |
Instance Method Details
#root? ⇒ Boolean
13 14 15 |
# File 'lib/open_ehr/parser/cadl_node.rb', line 13 def root? return parent.nil? end |