Changeset 308 for ruby/branches/0.5/lib/open_ehr/rm/data_types/quantity.rb
- Timestamp:
- Sep 28, 2009, 8:16:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.5/lib/open_ehr/rm/data_types/quantity.rb
r252 r308 151 151 def add(a_diff) 152 152 type_check(a_diff) 153 return result_builder( DvAbsoluteQuantity,153 return result_builder(self.class, 154 154 @magnitude+a_diff.magnitude) 155 155 end … … 157 157 def diff(other) 158 158 type_check(other) 159 return result_builder( DvAmount,159 return result_builder(self.class, 160 160 (@magnitude-other.magnitude).abs) 161 161 end … … 163 163 def subtract(a_diff) 164 164 type_check(a_diff) 165 return result_builder( DvAbsoluteQuantity,165 return result_builder(self.class, 166 166 @magnitude-a_diff.magnitude) 167 167 end
Note:
See TracChangeset
for help on using the changeset viewer.