class OpenEHR::AM::Archetype::ConstraintModel::ArchetypeSlot
Attributes
excludes[R]
includes[R]
Public Class Methods
create(args = { }) { |archetype_slot| ... }
click to toggle source
# 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
new(args = { })
click to toggle source
Calls superclass method
OpenEHR::AM::Archetype::ConstraintModel::CObject::new
# File lib/open_ehr/am/archetype/constraint_model.rb, line 242 def initialize(args = { }) super self.includes = args[:includes] self.excludes = args[:excludes] end
Public Instance Methods
any_allowed?()
click to toggle source
# File lib/open_ehr/am/archetype/constraint_model.rb, line 262 def any_allowed? return includes.nil? && excludes.nil? end
excludes=(excludes)
click to toggle source
# File lib/open_ehr/am/archetype/constraint_model.rb, line 255 def excludes=(excludes) if !excludes.nil? && excludes.empty? raise ArgumentError, 'excludes should not be empty' end @excludes = excludes end
includes=(includes)
click to toggle source
# File lib/open_ehr/am/archetype/constraint_model.rb, line 248 def includes=(includes) if !includes.nil? && includes.empty? raise ArgumentError, 'includes should not be empty' end @includes = includes end