class BigDecimal

Public Instance Methods

as_json(*_) click to toggle source
# File lib/twobook/number_handling.rb, line 9
def as_json(*_)
  truncate(Twobook::SCALE).to_f
end
inspect() click to toggle source

Makes it easier to work with these in a repl

# File lib/twobook/number_handling.rb, line 5
def inspect
  "#<BigDecimal '#{to_f}'>"
end