Module: ExchangeRatesGenerator::Sources

Defined in:
lib/exchange-rates-generator/sources/ecb.rb,
lib/exchange-rates-generator/sources/base.rb

Defined Under Namespace

Classes: Base, Ecb

Class Method Summary collapse

Class Method Details

.get(source_name) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/exchange-rates-generator/sources/base.rb', line 3

def self.get(source_name)
  begin
    ExchangeRatesGenerator::Sources.const_get( source_name.to_s.demodulize.camelize )
  rescue NameError => e
    nil
  end
end