Class: OpenEHR::AM::Archetype::ConstraintModel::CAttribute
- Inherits:
-
ArchetypeConstraint
- Object
- ArchetypeConstraint
- OpenEHR::AM::Archetype::ConstraintModel::CAttribute
- Defined in:
- lib/openehr/am/archetype/constraint_model.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#existence ⇒ Object
Returns the value of attribute existence.
-
#rm_attribute_name ⇒ Object
Returns the value of attribute rm_attribute_name.
Attributes inherited from ArchetypeConstraint
Instance Method Summary collapse
- #has_children? ⇒ Boolean
-
#initialize(args = { }) ⇒ CAttribute
constructor
A new instance of CAttribute.
- #path ⇒ Object
Methods inherited from ArchetypeConstraint
#congruent?, #has_path?, #node_conforms_to?
Constructor Details
#initialize(args = { }) ⇒ CAttribute
Returns a new instance of CAttribute.
136 137 138 139 140 141 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 136 def initialize(args = { }) super(args) self.rm_attribute_name = args[:rm_attribute_name] self.existence = args[:existence] self.children = args[:children] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
134 135 136 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 134 def children @children end |
#existence ⇒ Object
Returns the value of attribute existence.
134 135 136 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 134 def existence @existence end |
#rm_attribute_name ⇒ Object
Returns the value of attribute rm_attribute_name.
134 135 136 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 134 def rm_attribute_name @rm_attribute_name end |
Instance Method Details
#has_children? ⇒ Boolean
164 165 166 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 164 def has_children? !@children.nil? and !@children.empty? end |
#path ⇒ Object
168 169 170 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 168 def path @path || calculate_path end |