Class: OpenEHR::AM::Archetype::ConstraintModel::CComplexObject
- Inherits:
-
CDefinedObject
- Object
- ArchetypeConstraint
- CObject
- CDefinedObject
- OpenEHR::AM::Archetype::ConstraintModel::CComplexObject
- Defined in:
- lib/open_ehr/am/archetype/constraint_model.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Attributes inherited from CDefinedObject
Attributes inherited from CObject
#node_id, #occurrences, #rm_type_name
Attributes inherited from ArchetypeConstraint
Class Method Summary collapse
Instance Method Summary collapse
- #any_allowed? ⇒ Boolean
-
#initialize(args = { }) ⇒ CComplexObject
constructor
A new instance of CComplexObject.
Methods inherited from CDefinedObject
#default_value, #has_assumed_value?, #valid_value?
Methods inherited from ArchetypeConstraint
#congruent?, #has_path?, #node_conforms_to?
Constructor Details
#initialize(args = { }) ⇒ CComplexObject
Returns a new instance of CComplexObject.
195 196 197 198 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 195 def initialize(args = { }) super self.attributes = args[:attributes] end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
193 194 195 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 193 def attributes @attributes end |
Class Method Details
.create(args = { }, &block) ⇒ Object
204 205 206 207 208 209 210 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 204 def self.create(args = { }, &block) c_complex_object = new(args) if block_given? yield c_complex_object end return c_complex_object end |
Instance Method Details
#any_allowed? ⇒ Boolean
200 201 202 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 200 def any_allowed? return (@attributes.nil? or @attributes.empty?) end |