Changeset 247 for ruby/branches


Ignore:
Timestamp:
Sep 6, 2009, 7:16:22 PM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

move DvQuantified 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/quantity.rb

    r246 r247  
    5555          attr_reader :magnitude, :magnitude_status
    5656
    57           def initialize(magnitude, magnitude_status=nil,
    58                          normal_range=nil, normal_status = nil,
    59                          other_reference_ranges=nil)
    60             super(normal_range, normal_status, other_reference_ranges)
    61             self.magnitude = magnitude
    62             self.magnitude_status = magnitude_status
     57          def initialize(args = {})
     58            super(args)
     59            self.magnitude = args[:magnitude]
     60            self.magnitude_status = args[:magnitude_status]
    6361          end
    6462
    6563          def <=>(others)
    66             @value <=> others.value
     64            @magnitude <=> others.magnitude
    6765          end
    6866
Note: See TracChangeset for help on using the changeset viewer.