1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
module FloatSpecs class CanCoerce def initialize(a) @a = a end def coerce(b) [self.class.new(b), @a] end def /(b) @a.to_i % b.to_i end end end