Class: OpenEHR::AM::Archetype::ConstraintModel::CObject

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

Direct Known Subclasses

CDefinedObject, CReferenceObject

Instance Attribute Summary collapse

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 = { }) ⇒ CObject

Returns a new instance of CObject.



91
92
93
94
95
96
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 91

def initialize(args = { })
  super
  self.rm_type_name = args[:rm_type_name]
  self.node_id = args[:node_id]
  self.occurrences = args[:occurrences]
end

Instance Attribute Details

#node_idObject

Returns the value of attribute node_id.



89
90
91
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 89

def node_id
  @node_id
end

#occurrencesObject

Returns the value of attribute occurrences.



89
90
91
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 89

def occurrences
  @occurrences
end

#rm_type_nameObject

Returns the value of attribute rm_type_name.



89
90
91
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 89

def rm_type_name
  @rm_type_name
end

Class Method Details

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



119
120
121
122
123
124
125
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 119

def self.create(args = { }, &block)
  c_object = new(args)
  if block_given?
    yield c_object
  end
  return c_object
end