Module: Danconia::Serializable
- Included in:
- Money
- Defined in:
- lib/danconia/serializable.rb
Instance Method Summary collapse
Instance Method Details
#as_json(_options = {}) ⇒ Object
13 14 15 |
# File 'lib/danconia/serializable.rb', line 13 def as_json = {} {amount: @amount, currency: @currency.code} end |
#marshal_dump ⇒ Object
3 4 5 |
# File 'lib/danconia/serializable.rb', line 3 def marshal_dump {amount: @amount, currency: @currency.code, decimals: @decimals} end |