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.



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

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

Instance Attribute Details

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#parentObject (readonly)

Returns the value of attribute parent.



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

def parent
  @parent
end

#pathObject

Returns the value of attribute path.



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

def path
  @path
end

Instance Method Details

#root?Boolean

Returns:

  • (Boolean)


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

def root?
  return parent.nil?
end