Module: ExchangeRatesGenerator::Formatters

Defined in:
lib/exchange-rates-generator/formatters/base.rb,
lib/exchange-rates-generator/formatters/ruby.rb,
lib/exchange-rates-generator/formatters/javascript.rb

Defined Under Namespace

Classes: Base, Javascript, Ruby

Class Method Summary collapse

Class Method Details

.get(formatter_name) ⇒ Object



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

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