Changeset 390


Ignore:
Timestamp:
Jan 1, 2010, 11:10:31 AM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

fixed #73

Location:
ruby/trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/lib/open_ehr/am/archetype/assertion.rb

    r389 r390  
    9494        end
    9595
     96        class ExprBinaryOperator < ExprOperator
     97          attr_reader :right_operand, :left_operand
     98
     99          def initialize(args = { })
     100            super
     101            self.right_operand = args[:right_operand]
     102            self.left_operand = args[:left_operand]
     103          end
     104
     105          def right_operand=(right_operand)
     106            if right_operand.nil?
     107              raise ArgumentError, 'right_operand is mandatory'
     108            end
     109            @right_operand = right_operand
     110          end
     111
     112          def left_operand=(left_operand)
     113            if left_operand.nil?
     114              raise ArgumentError, 'left_operand is mandatory'
     115            end
     116            @left_operand = left_operand
     117          end
     118        end
     119
     120        class AssertionVariable
     121          attr_reader :name, :definition
     122
     123          def initialize(args = { })
     124            self.name = args[:name]
     125            self.definition = args[:definition]
     126          end
     127
     128          def name=(name)
     129            if name.nil?
     130              raise ArgumentError, 'name is mandatory'
     131            end
     132            @name = name
     133          end
     134
     135          def definition=(definition)
     136            if definition.nil?
     137              raise ArgumentError, 'definition is mandatory'
     138            end
     139            @definition = definition
     140          end
     141        end
     142
    96143        class OperatorKind
    97144          OP_EQ = 2001
Note: See TracChangeset for help on using the changeset viewer.