Ignore:
Timestamp:
Nov 20, 2009, 3:11:04 PM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

merge from branches/0.5

Location:
ruby/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk

  • ruby/trunk/lib/open_ehr/rm/data_types/quantity.rb

    r298 r369  
    6666
    6767          def <=>(others)
    68             @magnitude <=> others.magnitude
     68            self.magnitude <=> others.magnitude
    6969          end
    7070
     
    151151          def add(a_diff)
    152152            type_check(a_diff)
    153             return result_builder(DvAbsoluteQuantity,
     153            return result_builder(self.class,
    154154                                  @magnitude+a_diff.magnitude)
    155155          end
     
    157157          def diff(other)
    158158            type_check(other)
    159             return result_builder(DvAmount,
     159            return result_builder(self.class,
    160160                                  (@magnitude-other.magnitude).abs)
    161161          end
     
    163163          def subtract(a_diff)
    164164            type_check(a_diff)
    165             return result_builder(DvAbsoluteQuantity,
     165            return result_builder(self.class,
    166166                                  @magnitude-a_diff.magnitude)
    167167          end
Note: See TracChangeset for help on using the changeset viewer.