struct Money::Currency::Rate

Included Modules

Defined in:

money/currency/json.cr
money/currency/rate.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(from : Currency, to : Currency, value : Int64) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(from _from = @from, to _to = @to, value _value = @value) #

[View source]
def from : Currency #

def to : Currency #

def to_big_d : BigDecimal #

Returns conversion rate #value as BigDecimal object.


[View source]
def to_f64 : Float64 #

Returns conversion rate #value as Float64.


[View source]
def to_i64 : Int64 #

[View source]
def to_json(json : JSON::Builder) #

[View source]
def to_money(bank = nil) : Money #

Returns conversion rate #value as Money object.


[View source]
def to_s(io : IO) : Nil #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def value : Int64 #