class OpenEHR::AM::Archetype::ConstraintModel::CComplexObject
Attributes
attributes[RW]
Public Class Methods
new(args = { })
click to toggle source
Calls superclass method
OpenEHR::AM::Archetype::ConstraintModel::CDefinedObject::new
# File lib/openehr/am/archetype/constraint_model.rb, line 246 def initialize(args = { }) super self.attributes = args[:attributes] end
Public Instance Methods
any_allowed?()
click to toggle source
# File lib/openehr/am/archetype/constraint_model.rb, line 263 def any_allowed? return (@attributes.nil? or @attributes.empty?) end
attributes=(attributes)
click to toggle source
# File lib/openehr/am/archetype/constraint_model.rb, line 251 def attributes=(attributes) @attributes = attributes.inject([]) do |array, child| child.parent = self array << child end if attributes @attributes = [] if attributes.nil? end
has_attributes?()
click to toggle source
# File lib/openehr/am/archetype/constraint_model.rb, line 259 def has_attributes? !attributes.nil? and !attributes.empty? end