class OpenEHR::AM::Archetype::Assertion::OperatorKind

Constants

OP_AND
OP_DIVIDE
OP_EQ
OP_EXISTS
OP_EXP
OP_FOR_ALL
OP_GE
OP_GT
OP_IMPLIES
OP_LE
OP_LT
OP_MATCHES
OP_MINUS
OP_MULTIPLY
OP_NE
OP_NOT
OP_OR
OP_PLUS
OP_XOR

Attributes

value[R]

Public Class Methods

new(args = { }) click to toggle source
# File lib/open_ehr/am/archetype/assertion.rb, line 168
def initialize(args = { })
  self.value = args[:value]
end
valid_operator?(value) click to toggle source
# File lib/open_ehr/am/archetype/assertion.rb, line 179
def self.valid_operator?(value)
  if value >= OP_EQ && value <= OP_EXP
    return true
  else
    return false
  end
end

Public Instance Methods

value=(value) click to toggle source
# File lib/open_ehr/am/archetype/assertion.rb, line 172
def value=(value)
  unless OperatorKind.valid_operator? value
    raise ArgumentError, 'invalid value'
  end
  @value = value
end