Changeset 237


Ignore:
Timestamp:
Aug 28, 2009, 1:34:41 AM (10 years ago)
Author:
KOBAYASHI, Shinji
Message:

move from Test to Rspec

Location:
ruby/branches/0.5
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/lib/open_ehr/rm/data_types/encapsulated.rb

    r236 r237  
    2323
    2424          def language=(language)
    25             if language.nil? ||
     25            if !language.nil? &&
    2626                !Locale::Info.language_code?(language.code_string)
    2727              raise ArgumentError, 'invalid language code'
     
    3131
    3232          def charset=(charset)
    33             if charset.nil? || !charset_valid?(charset.code_string)
     33            if !charset.nil? && !charset_valid?(charset.code_string)
    3434              raise ArgumentError, 'invalid charset'
    3535            end
     
    8181        class DvParsable < DvEncapsulated
    8282          attr_reader :value, :formalism
    83           def initialize(charset, language, size, formalism, value)
    84             super(charset, language, size)
    85             self.formalism = formalism
    86             self.value = value
    87           end
    8883
    89           def value=(value)
    90             raise ArgumentError, 'value must not be nil' if value.nil?
    91             @value = value
     84          def initialize(args = {})
     85            super(args)
     86            self.formalism = args[:formalism]
    9287          end
    9388
Note: See TracChangeset for help on using the changeset viewer.