Class: OpenEHR::AM::Archetype::ConstraintModel::CDefinedObject

Inherits:
CObject show all
Defined in:
lib/openehr/am/archetype/constraint_model.rb

Direct Known Subclasses

CComplexObject, CDomainType, CPrimitiveObject

Instance Attribute Summary collapse

Attributes inherited from CObject

#node_id, #occurrences, #rm_type_name

Attributes inherited from ArchetypeConstraint

#parent, #path

Instance Method Summary collapse

Methods inherited from CObject

#path

Methods inherited from ArchetypeConstraint

#congruent?, #has_path?, #node_conforms_to?

Constructor Details

#initialize(args = { }) ⇒ CDefinedObject

Returns a new instance of CDefinedObject.



185
186
187
188
# File 'lib/openehr/am/archetype/constraint_model.rb', line 185

def initialize(args = { })
  super
  self.assumed_value = args[:assumed_value]
end

Instance Attribute Details

#assumed_valueObject

Returns the value of attribute assumed_value.



183
184
185
# File 'lib/openehr/am/archetype/constraint_model.rb', line 183

def assumed_value
  @assumed_value
end

Instance Method Details

#any_allowed?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


202
203
204
# File 'lib/openehr/am/archetype/constraint_model.rb', line 202

def any_allowed?
  raise NotImplementedError, 'subclass should implement this method'
end

#default_valueObject

Raises:

  • (NotImplementedError)


194
195
196
# File 'lib/openehr/am/archetype/constraint_model.rb', line 194

def default_value
  raise NotImplementedError, 'subclass should implement this method'
end

#has_assumed_value?Boolean

Returns:

  • (Boolean)


190
191
192
# File 'lib/openehr/am/archetype/constraint_model.rb', line 190

def has_assumed_value?
  return !@assumed_value.nil?
end

#valid_value?(value) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


198
199
200
# File 'lib/openehr/am/archetype/constraint_model.rb', line 198

def valid_value?(value)
  raise NotImplementedError, 'subclass should implement this method'
end