Class: BigDecimal
- Inherits:
-
Object
- Object
- BigDecimal
- Defined in:
- lib/twobook/number_handling.rb
Instance Method Summary collapse
- #as_json(*_) ⇒ Object
-
#inspect ⇒ Object
Makes it easier to work with these in a repl.
Instance Method Details
#as_json(*_) ⇒ Object
9 10 11 |
# File 'lib/twobook/number_handling.rb', line 9 def as_json(*_) truncate(Twobook::SCALE).to_f end |
#inspect ⇒ Object
Makes it easier to work with these in a repl
5 6 7 |
# File 'lib/twobook/number_handling.rb', line 5 def inspect "#<BigDecimal '#{to_f}'>" end |