Ignore:
Timestamp:
Jan 7, 2010, 1:32:48 PM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

refs #71, #71

File:
1 edited

Legend:

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

    r373 r396  
    106106      # ref_imple_eiffel/components/adl_parser/src/interface/adl_definition.e
    107107
    108       class VALIDITY_KIND
     108      class ValidityKind
     109        attr_reader :value
     110
     111        MANDATORY = 1001
     112        OPTIONAL = 1002
     113        DISALLOWED = 1003
     114
     115        def initialize(args = { })
     116          self.value = args[:value]
     117        end
     118
     119        def value=(value)
     120          unless [MANDATORY, OPTIONAL, DISALLOWED].include? value
     121            raise ArgumentError, 'invalid value'
     122          end
     123          @value = value
     124        end
    109125
    110126      end
Note: See TracChangeset for help on using the changeset viewer.