Class: OpenEHR::AM::Archetype::ConstraintModel::CPrimitiveObject
- Inherits:
-
CDefinedObject
- Object
- ArchetypeConstraint
- CObject
- CDefinedObject
- OpenEHR::AM::Archetype::ConstraintModel::CPrimitiveObject
- Defined in:
- lib/openehr/am/archetype/constraint_model.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
Returns the value of attribute item.
Attributes inherited from CDefinedObject
Attributes inherited from CObject
#node_id, #occurrences, #rm_type_name
Attributes inherited from ArchetypeConstraint
Instance Method Summary collapse
- #any_allowed? ⇒ Boolean
-
#initialize(args = { }) ⇒ CPrimitiveObject
constructor
A new instance of CPrimitiveObject.
- #method_missing(meth, *args) ⇒ Object
Methods inherited from CDefinedObject
#default_value, #has_assumed_value?, #valid_value?
Methods inherited from CObject
#node_conforms_to?, #path, #to_rm
Methods inherited from ArchetypeConstraint
#congruent?, #has_path?, #node_conforms_to?
Constructor Details
#initialize(args = { }) ⇒ CPrimitiveObject
Returns a new instance of CPrimitiveObject.
263 264 265 266 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 263 def initialize(args = { }) super self.item = args[:item] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
279 280 281 282 283 284 285 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 279 def method_missing(meth, *args) if !self.item.nil? && self.item.respond_to?(meth) self.item.send(meth, *args) else super end end |
Instance Attribute Details
#item ⇒ Object
Returns the value of attribute item.
261 262 263 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 261 def item @item end |
Instance Method Details
#any_allowed? ⇒ Boolean
268 269 270 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 268 def any_allowed? return item.nil? end |