Module: LAA::FeeCalculator

Defined in:
lib/laa/fee_calculator.rb,
lib/laa/fee_calculator/client.rb,
lib/laa/fee_calculator/errors.rb,
lib/laa/fee_calculator/version.rb,
lib/laa/fee_calculator/calculator.rb,
lib/laa/fee_calculator/connection.rb,
lib/laa/fee_calculator/fee_scheme.rb,
lib/laa/fee_calculator/raise_error.rb,
lib/laa/fee_calculator/has_manyable.rb,
lib/laa/fee_calculator/configuration.rb

Defined Under Namespace

Modules: HasManyable Classes: Calculator, Client, ClientError, Configuration, Connection, FeeScheme, RaiseError, ResourceNotFound, ResponseError

Constant Summary collapse

VERSION =
'2.0.0'
USER_AGENT =
"laa-fee-calculator-client/#{VERSION}".freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject Also known as: config



25
26
27
# File 'lib/laa/fee_calculator.rb', line 25

def configuration
  @configuration ||= Configuration.new
end

Class Method Details

.clientObject



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

def client
  Client.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



30
31
32
33
# File 'lib/laa/fee_calculator.rb', line 30

def configure
  yield(configuration) if block_given?
  configuration
end

.resetObject



35
36
37
# File 'lib/laa/fee_calculator.rb', line 35

def reset
  @configuration = Configuration.new
end

.rootObject



14
15
16
17
# File 'lib/laa/fee_calculator.rb', line 14

def root
  spec = Gem::Specification.find_by_name('laa-fee-calculator-client')
  spec.gem_dir
end