# and not e.g. 4.0e-05
# Unfortunately you can't extend Numeric classes directly (e.g. `Coord < Float`).
class Coord < DelegateClass(Float)
- def initialize(obj)
- super(obj)
- end
-
def to_s
format("%<coord>.7f", :coord => self)
end
- def as_json(_)
+ def as_json(*)
format("%<coord>.7f", :coord => self).to_f
end
end