Class: OpenEHR::AM::Archetype::ConstraintModel::CDefinedObject
- Inherits:
-
CObject
- Object
- ArchetypeConstraint
- CObject
- OpenEHR::AM::Archetype::ConstraintModel::CDefinedObject
- Defined in:
- lib/open_ehr/am/archetype/constraint_model.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#assumed_value ⇒ Object
Returns the value of attribute assumed_value.
Attributes inherited from CObject
#node_id, #occurrences, #rm_type_name
Attributes inherited from ArchetypeConstraint
Instance Method Summary collapse
- #any_allowed? ⇒ Boolean
- #default_value ⇒ Object
- #has_assumed_value? ⇒ Boolean
-
#initialize(args = { }) ⇒ CDefinedObject
constructor
A new instance of CDefinedObject.
- #valid_value?(value) ⇒ Boolean
Methods inherited from CObject
Methods inherited from ArchetypeConstraint
#congruent?, #has_path?, #node_conforms_to?
Constructor Details
#initialize(args = { }) ⇒ CDefinedObject
Returns a new instance of CDefinedObject.
157 158 159 160 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 157 def initialize(args = { }) super self.assumed_value = args[:assumed_value] end |
Instance Attribute Details
#assumed_value ⇒ Object
Returns the value of attribute assumed_value.
155 156 157 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 155 def assumed_value @assumed_value end |
Instance Method Details
#any_allowed? ⇒ Boolean
174 175 176 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 174 def any_allowed? raise NotImplementedError, 'subclass should implement this method' end |
#default_value ⇒ Object
166 167 168 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 166 def default_value raise NotImplementedError, 'subclass should implement this method' end |
#has_assumed_value? ⇒ Boolean
162 163 164 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 162 def has_assumed_value? return !@assumed_value.nil? end |
#valid_value?(value) ⇒ Boolean
170 171 172 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 170 def valid_value?(value) raise NotImplementedError, 'subclass should implement this method' end |