Class: OpenEHR::AM::Archetype::ConstraintModel::CComplexObject

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

Direct Known Subclasses

CArchetypeRoot

Instance Attribute Summary collapse

Attributes inherited from CDefinedObject

#assumed_value

Attributes inherited from CObject

#node_id, #occurrences, #rm_type_name

Attributes inherited from ArchetypeConstraint

#parent, #path

Instance Method Summary collapse

Methods inherited from CDefinedObject

#default_value, #has_assumed_value?, #valid_value?

Methods inherited from CObject

#path, #to_rm

Methods inherited from ArchetypeConstraint

#congruent?, #has_path?, #node_conforms_to?

Constructor Details

#initialize(args = { }) ⇒ CComplexObject

Returns a new instance of CComplexObject.



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

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

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

Instance Method Details

#any_allowed?Boolean

Returns:

  • (Boolean)


263
264
265
# File 'lib/openehr/am/archetype/constraint_model.rb', line 263

def any_allowed?
  return (@attributes.nil? or @attributes.empty?)
end

#has_attributes?Boolean

Returns:

  • (Boolean)


259
260
261
# File 'lib/openehr/am/archetype/constraint_model.rb', line 259

def has_attributes?
  !attributes.nil? and !attributes.empty?
end