Changeset 241 for ruby/branches/0.5


Ignore:
Timestamp:
Sep 1, 2009, 8:58:54 PM (11 years ago)
Author:
KOBAYASHI, Shinji
Message:

change test/unit 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

    r238 r241  
    5858          attr_accessor :uri, :data, :compression_algorithm,
    5959          :integrity_check, :integrity_check_algorithm, :alternate_text
    60           def initialize(charset, language, size, media_type, uri=nil,
    61                          data=nil, compression_algorithm=nil,
    62                          integrity_check=nil, integrity_check_algorithm=nil,
    63                          alternate_text=nil)
    64             super(charset, language, size)
    65             self.media_type = media_type
    66             @uri = uri
    67             @data = data
    68             @compression_algorithm = compression_algorithm
    69             @integrity_check = integrity_check
    70             @integrity_check_algorithm = integrity_check_algorithm
    71             @alternate_text = alternate_text
     60
     61          def initialize(args = {})
     62            super(args)
     63            self.media_type = args[:media_type]
     64            self.uri = args[:uri]
     65            self.data = args[:data]
     66            self.compression_algorithm = args[:compression_algorithm]
     67            self.integrity_check = args[:integrity_check]
     68            self.integrity_check_algorithm = args[:integrity_check_algorithm]
     69            self.alternate_text = args[:alternate_text]
    7270          end
     71
    7372          def media_type=(media_type)
    7473            if media_type.code_string.nil?
Note: See TracChangeset for help on using the changeset viewer.