class DutyCalculator::Response
Public Class Methods
new(hash = {})
click to toggle source
Calls superclass method
# File lib/duty_calculator/response.rb, line 7 def initialize(hash = {}) super hash.each_pair do |k,v| if k == '__content__' && v.to_s == 0.to_s self['value'] = v.to_f elsif k == '__content__' && v.to_i > 0 self['value'] = v.to_f elsif k == '__content__' self['value'] = v else self[k] = v end end end