Class: OpenEHR::AM::Archetype::Assertion::OperatorKind

Inherits:
Object
  • Object
show all
Defined in:
lib/openehr/am/archetype/assertion.rb

Constant Summary collapse

OP_EQ =
2001
OP_NE =
2002
OP_LE =
2003
OP_LT =
2004
OP_GE =
2005
OP_GT =
2006
OP_MATCHES =
2007
OP_NOT =
2010
OP_AND =
2011
OP_OR =
2012
OP_XOR =
2013
OP_IMPLIES =
2014
OP_FOR_ALL =
2015
OP_EXISTS =
2016
OP_PLUS =
2020
OP_MINUS =
2021
OP_MULTIPLY =
2022
OP_DIVIDE =
2023
OP_EXP =
2024

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = { }) ⇒ OperatorKind

Returns a new instance of OperatorKind.



168
169
170
# File 'lib/openehr/am/archetype/assertion.rb', line 168

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

Instance Attribute Details

#valueObject

Returns the value of attribute value.



166
167
168
# File 'lib/openehr/am/archetype/assertion.rb', line 166

def value
  @value
end

Class Method Details

.valid_operator?(value) ⇒ Boolean

Returns:

  • (Boolean)


179
180
181
182
183
184
185
# File 'lib/openehr/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