Changeset 236


Ignore:
Timestamp:
Aug 28, 2009, 1:11:01 AM (11 years ago)
Author:
KOBAYASHI, Shinji
Message:

move from Test to Rspec

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

Legend:

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

    r216 r236  
    1010      module Encapsulated
    1111        class DvEncapsulated  < OpenEHR::RM::DataTypes::Basic::DataValue
    12           attr_reader :language, :charset, :size
    13           def initialize(charset, language, size)
    14             self.charset = charset
    15             self.language = language
    16             self.size = size
     12          attr_reader :language, :charset
     13
     14          def initialize(args = {})
     15            super(args)
     16            self.charset = args[:charset]
     17            self.language = args[:language]
    1718          end
    1819
    19           def size=(size)
    20             if size < 0
    21               raise ArgumentError, "negative size"
    22             end
    23             @size = size
     20          def size
     21            @value.size
    2422          end
    2523
     
    4038
    4139          private
    42           def size_positive
    43             raise ArgumentError, "size must be positive" if size < 0
    44           end
    4540
    4641          def charset_valid?(charset)
Note: See TracChangeset for help on using the changeset viewer.