Class: OpenEHR::Parser::ArchetypeNode

Inherits:
Object
  • Object
show all
Defined in:
lib/openehr/parser/adl_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent = nil) ⇒ ArchetypeNode

Returns a new instance of ArchetypeNode.



62
63
64
65
# File 'lib/openehr/parser/adl_helper.rb', line 62

def initialize(parent = nil)
  @parent = parent
  @path = '/' if parent.nil?
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



60
61
62
# File 'lib/openehr/parser/adl_helper.rb', line 60

def id
  @id
end

#parentObject (readonly)

Returns the value of attribute parent.



59
60
61
# File 'lib/openehr/parser/adl_helper.rb', line 59

def parent
  @parent
end

#pathObject

Returns the value of attribute path.



60
61
62
# File 'lib/openehr/parser/adl_helper.rb', line 60

def path
  @path
end

Instance Method Details

#root?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/openehr/parser/adl_helper.rb', line 67

def root?
  return parent.nil?
end