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



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

def string
  @string
end

Instance Method Details

#valueObject

converts the currency to it’s storage representation



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

def value
  converted == 0.0 ? nil : converted
end