module Stockman module Logic class Utils def self.serialize_amount(value) if value == Float::INFINITY 'inf' else value.to_i end end def self.deserialize_amount(value) if value == 'inf' Float::INFINITY else value.to_i end end end end end