Class: Forex::CurrencyCode
- Inherits:
-
Struct
- Object
- Struct
- Forex::CurrencyCode
- Defined in:
- lib/forex/tabular_rates.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
Returns the value of attribute string.
-
#translations ⇒ Object
Returns the value of attribute translations.
Instance Method Summary collapse
- #invalid? ⇒ Boolean
- #to_s ⇒ Object
-
#valid? ⇒ Boolean
TODO validate the currency codes via www.xe.com/iso4217.php.
Instance Attribute Details
#string ⇒ Object
Returns the value of attribute string
83 84 85 |
# File 'lib/forex/tabular_rates.rb', line 83 def string @string end |
#translations ⇒ Object
Returns the value of attribute translations
83 84 85 |
# File 'lib/forex/tabular_rates.rb', line 83 def translations @translations end |
Instance Method Details
#invalid? ⇒ Boolean
90 91 92 |
# File 'lib/forex/tabular_rates.rb', line 90 def invalid? !valid? end |
#to_s ⇒ Object
94 95 96 |
# File 'lib/forex/tabular_rates.rb', line 94 def to_s translated end |
#valid? ⇒ Boolean
TODO validate the currency codes via www.xe.com/iso4217.php
86 87 88 |
# File 'lib/forex/tabular_rates.rb', line 86 def valid? !translated.blank? && translated.length == 3 end |