Class: SteamPrices::Country
- Inherits:
-
Object
- Object
- SteamPrices::Country
- Defined in:
- lib/steam_prices/steam_country.rb
Class Attribute Summary collapse
-
.currencies ⇒ Object
readonly
Returns the value of attribute currencies.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Country
constructor
A new instance of Country.
Constructor Details
#initialize ⇒ Country
Returns a new instance of Country.
13 14 |
# File 'lib/steam_prices/steam_country.rb', line 13 def initialize end |
Class Attribute Details
.currencies ⇒ Object (readonly)
Returns the value of attribute currencies.
11 12 13 |
# File 'lib/steam_prices/steam_country.rb', line 11 def currencies @currencies end |
Class Method Details
.get_country(currency) ⇒ Object
20 21 22 |
# File 'lib/steam_prices/steam_country.rb', line 20 def self.get_country(currency) return (currency.length == 3 ? @currencies[currency] : nil) end |
.get_currency(country) ⇒ Object
16 17 18 |
# File 'lib/steam_prices/steam_country.rb', line 16 def self.get_currency(country) return (country.length == 2 ? @currencies.key(country) : nil) end |