mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 04:55:20 +02:00
Reindent Money class
This commit is contained in:
parent
996a2e1c75
commit
cc7b878d50
1 changed files with 57 additions and 57 deletions
|
@ -50,8 +50,8 @@ class Money
|
||||||
@currency.default_format.gsub("%n", formatted_amount).gsub("%u", @currency.symbol)
|
@currency.default_format.gsub("%n", formatted_amount).gsub("%u", @currency.symbol)
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_json(*_args)
|
def as_json
|
||||||
{ amount: @amount, currency: @currency.iso_code }.to_json
|
{ amount: @amount, currency: @currency.iso_code }.as_json
|
||||||
end
|
end
|
||||||
|
|
||||||
def <=>(other)
|
def <=>(other)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue