Class: OpenEHR::AM::Archetype::ConstraintModel::ArchetypeSlot
- Inherits:
-
CReferenceObject
- Object
- ArchetypeConstraint
- CObject
- CReferenceObject
- OpenEHR::AM::Archetype::ConstraintModel::ArchetypeSlot
- Defined in:
- lib/open_ehr/am/archetype/constraint_model.rb
Instance Attribute Summary collapse
-
#excludes ⇒ Object
Returns the value of attribute excludes.
-
#includes ⇒ Object
Returns the value of attribute includes.
Attributes inherited from CObject
#node_id, #occurrences, #rm_type_name
Attributes inherited from ArchetypeConstraint
Class Method Summary collapse
Instance Method Summary collapse
- #any_allowed? ⇒ Boolean
-
#initialize(args = { }) ⇒ ArchetypeSlot
constructor
A new instance of ArchetypeSlot.
Methods inherited from ArchetypeConstraint
#congruent?, #has_path?, #node_conforms_to?
Constructor Details
#initialize(args = { }) ⇒ ArchetypeSlot
Returns a new instance of ArchetypeSlot.
242 243 244 245 246 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 242 def initialize(args = { }) super self.includes = args[:includes] self.excludes = args[:excludes] end |
Instance Attribute Details
#excludes ⇒ Object
Returns the value of attribute excludes.
240 241 242 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 240 def excludes @excludes end |
#includes ⇒ Object
Returns the value of attribute includes.
240 241 242 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 240 def includes @includes end |
Class Method Details
.create(args = { }, &block) ⇒ Object
266 267 268 269 270 271 272 273 274 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 266 def self.create(args = { }, &block) archetype_slot = new(args) archetype_slot.includes = args[:includes] archetype_slot.excludes = args[:excludes] if block_given? yield archetype_slot end return archetype_slot end |
Instance Method Details
#any_allowed? ⇒ Boolean
262 263 264 |
# File 'lib/open_ehr/am/archetype/constraint_model.rb', line 262 def any_allowed? return includes.nil? && excludes.nil? end |