Class: Forex::Currency

Inherits:
Struct
  • Object
show all
Defined in:
lib/forex/tabular_rates.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#stringObject

Returns the value of attribute string

Returns:

  • (Object)

    the current value of string



68
69
70
# File 'lib/forex/tabular_rates.rb', line 68

def string
  @string
end

Instance Method Details

#valueObject

converts the currency to it’s storage representation



71
72
73
# File 'lib/forex/tabular_rates.rb', line 71

def value
  converted == 0.0 ? nil : converted
end