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

#node_conforms_to?, #path, #to_rm

Methods inherited from ArchetypeConstraint

#congruent?, #has_path?, #node_conforms_to?

Constructor Details

#initialize(args = { }) ⇒ CDefinedObject

Returns a new instance of CDefinedObject.



238
239
240
241
# File 'lib/openehr/am/archetype/constraint_model.rb', line 238

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

Instance Attribute Details

#assumed_valueObject

Returns the value of attribute assumed_value.



236
237
238
# File 'lib/openehr/am/archetype/constraint_model.rb', line 236

def assumed_value
  @assumed_value
end

Instance Method Details

#any_allowed?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


255
256
257
# File 'lib/openehr/am/archetype/constraint_model.rb', line 255

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

#default_valueObject

Raises:

  • (NotImplementedError)


247
248
249
# File 'lib/openehr/am/archetype/constraint_model.rb', line 247

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

#has_assumed_value?Boolean

Returns:

  • (Boolean)


243
244
245
# File 'lib/openehr/am/archetype/constraint_model.rb', line 243

def has_assumed_value?
  return !@assumed_value.nil?
end

#valid_value?(value) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


251
252
253
# File 'lib/openehr/am/archetype/constraint_model.rb', line 251

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