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.
144 145 146 147 148 149 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 144 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.
142 143 144 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 142 def children @children end |
#existence ⇒ Object
Returns the value of attribute existence.
142 143 144 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 142 def existence @existence end |
#rm_attribute_name ⇒ Object
Returns the value of attribute rm_attribute_name.
142 143 144 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 142 def rm_attribute_name @rm_attribute_name end |
Instance Method Details
#has_children? ⇒ Boolean
172 173 174 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 172 def has_children? !@children.nil? and !@children.empty? end |
#path ⇒ Object
176 177 178 |
# File 'lib/openehr/am/archetype/constraint_model.rb', line 176 def path @path || calculate_path end |