Module: Apilayer

Defined in:
lib/apilayer/vat.rb,
lib/apilayer.rb,
lib/apilayer/error.rb,
lib/apilayer/currency.rb,
lib/apilayer/connection_helper.rb

Overview

Ruby wrapper for currencylayer. See currencylayer.com/documentation for more info

Defined Under Namespace

Modules: ConnectionHelper, Currency, Vat Classes: Error

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configsObject


15
16
17
# File 'lib/apilayer.rb', line 15

def self.configs
  @configs ||= init_configs
end

Class Method Details

.configure {|configs| ... } ⇒ Object

Yields:


23
24
25
# File 'lib/apilayer.rb', line 23

def self.configure
  yield(configs)
end

.init_configsObject


10
11
12
13
# File 'lib/apilayer.rb', line 10

def self.init_configs
  keys = Struct.new(:currency_key, :vat_key)
  keys.new
end

.reset!Object


19
20
21
# File 'lib/apilayer.rb', line 19

def self.reset!
  @configs = init_configs
end