Rev | Line | |
---|
[383] | 1 | module OpenEHR
|
---|
| 2 | module AM
|
---|
| 3 | module Archetype
|
---|
| 4 | module Assertion
|
---|
| 5 | class Assertion
|
---|
| 6 | attr_reader :expression, :tag
|
---|
| 7 | attr_accessor :string_expression, :variables
|
---|
| 8 |
|
---|
| 9 | def initialize(args = { })
|
---|
| 10 | self.expression = args[:expression]
|
---|
| 11 | self.tag = args[:tag]
|
---|
| 12 | self.string_expression = args[:string_expression]
|
---|
| 13 | self.variables = args[:variables]
|
---|
| 14 | end
|
---|
| 15 |
|
---|
| 16 | def expression=(expression)
|
---|
| 17 | if expression.nil? or expression.type.upcase != 'BOOLEAN'
|
---|
| 18 | raise ArgumentError, 'invalid expression'
|
---|
| 19 | end
|
---|
| 20 | @expression = expression
|
---|
| 21 | end
|
---|
| 22 |
|
---|
| 23 | def tag=(tag)
|
---|
| 24 | if !tag.nil? && tag.empty?
|
---|
| 25 | raise ArgumentError, 'tag should not be empty'
|
---|
| 26 | end
|
---|
| 27 | @tag = tag
|
---|
| 28 | end
|
---|
| 29 | end
|
---|
| 30 |
|
---|
| 31 | class ExprItem
|
---|
| 32 | end
|
---|
| 33 | end # of Assetion
|
---|
| 34 | end # of Archtype
|
---|
| 35 | end #of AM
|
---|
| 36 | end # of OpenEHR
|
---|
Note:
See
TracBrowser
for help on using the repository browser.