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.
94 95 96 97 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 94 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
114 115 116 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 114 def method_missing(key) return @items[key.to_sym] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
92 93 94 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 92 def code @code end |
#items ⇒ Object
Returns the value of attribute items.
91 92 93 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 91 def items @items end |
Instance Method Details
#keys ⇒ Object
106 107 108 109 110 111 112 |
# File 'lib/open_ehr/am/archetype/ontology.rb', line 106 def keys if items.nil? return Set.new else return Set.new(@items.keys) end end |