Module: ExchangeRatesGenerator

Defined in:
lib/exchange-rates-generator.rb,
lib/exchange-rates-generator/cli.rb,
lib/exchange-rates-generator/errors.rb,
lib/exchange-rates-generator/currency.rb,
lib/exchange-rates-generator/currencies.rb,
lib/exchange-rates-generator/sources/ecb.rb,
lib/exchange-rates-generator/sources/base.rb,
lib/exchange-rates-generator/formatters/base.rb,
lib/exchange-rates-generator/formatters/ruby.rb,
lib/exchange-rates-generator/formatters/javascript.rb

Defined Under Namespace

Modules: Currencies, Errors, Formatters, Sources Classes: CLI, Currency

Class Method Summary collapse

Class Method Details

.log_toObject



15
16
17
# File 'lib/exchange-rates-generator.rb', line 15

def self.log_to
  @log_to ||= STDOUT
end

.log_to=(l) ⇒ Object



11
12
13
# File 'lib/exchange-rates-generator.rb', line 11

def self.log_to=(l)
  @log_to = l
end

.loggerObject



23
24
25
26
27
28
29
# File 'lib/exchange-rates-generator.rb', line 23

def self.logger
  @logger ||= begin
    log = Logger.new(log_to)
    log.level = Logger::INFO
    log
  end
end

.logger=(logger) ⇒ Object



19
20
21
# File 'lib/exchange-rates-generator.rb', line 19

def self.logger=(logger)
  @logger = logger
end