Class: SteamPrices::Country

Inherits:
Object
  • Object
show all
Defined in:
lib/steam_prices/steam_country.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCountry

Returns a new instance of Country.



13
14
# File 'lib/steam_prices/steam_country.rb', line 13

def initialize
end

Class Attribute Details

.currenciesObject (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