Class: OpenEHR::AM::Archetype::Ontology::ArchetypeTerm
- Inherits:
-
Object
- Object
- OpenEHR::AM::Archetype::Ontology::ArchetypeTerm
- Defined in:
- lib/open_ehr/am/archetype/ontology.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize(args = { }) ⇒ ArchetypeTerm
constructor
A new instance of ArchetypeTerm.
- #keys ⇒ Object
- #method_missing(key) ⇒ Object
Constructor Details
#initialize(args = { }) ⇒ ArchetypeTerm
Returns a new instance of ArchetypeTerm.
99 100 101 102 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 99 def initialize(args = { }) self.code = args[:code] self.items =args[:items] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(key) ⇒ Object
119 120 121 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 119 def method_missing(key) return @items[key.to_sym] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
97 98 99 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 97 def code @code end |
#items ⇒ Object
Returns the value of attribute items.
96 97 98 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 96 def items @items end |
Instance Method Details
#keys ⇒ Object
111 112 113 114 115 116 117 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 111 def keys if items.nil? return Set.new else return Set.new(@items.keys) end end |