Class: OpenEHR::AM::Archetype::ConstraintModel::ConstraintRef

Inherits:
CReferenceObject show all
Defined in:
lib/open_ehr/am/archetype/constraint_model.rb

Instance Attribute Summary collapse

Attributes inherited from CObject

#node_id, #occurrences, #rm_type_name

Attributes inherited from ArchetypeConstraint

#parent, #path

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ArchetypeConstraint

#congruent?, #has_path?, #node_conforms_to?

Constructor Details

#initialize(args = { }) ⇒ ConstraintRef

Returns a new instance of ConstraintRef.



280
281
282
283
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 280

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

Instance Attribute Details

#referenceObject

Returns the value of attribute reference.



278
279
280
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 278

def reference
  @reference
end

Class Method Details

.create(args = { }, &block) ⇒ Object



292
293
294
295
296
297
298
299
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 292

def self.create(args = { }, &block)
  constraint_ref = new(args)
  constraint_ref.reference = args[:reference]
  if block_given?
    yield constraint_ref
  end
  return constraint_ref
end