Module: LemonWay

Defined in:
lib/lemon_way/p2p.rb,
lib/lemonway_ruby.rb,
lib/lemon_way/form.rb,
lib/lemon_way/error.rb,
lib/lemon_way/client.rb,
lib/lemon_way/wallet.rb,
lib/lemon_way/railtie.rb,
lib/lemon_way/version.rb,
lib/lemon_way/money_in.rb,
lib/lemon_way/money_out.rb,
lib/lemon_way/middleware.rb,
lib/lemon_way/generators/id.rb,
lib/lemon_way/helpers/forms.rb,
lib/lemon_way/response_adapter.rb

Defined Under Namespace

Modules: Generators, Helpers Classes: Client, Form, LemonWayError, Middleware, MissingConfigurationError, MoneyIn, MoneyOut, P2P, Railtie, ResponseAdapter, Wallet

Constant Summary collapse

VERSION =
'0.10.0'.freeze
@@client =
nil
@@configuration =
{}

Class Method Summary collapse

Class Method Details

.clientObject



34
35
36
# File 'lib/lemonway_ruby.rb', line 34

def self.client
  @@client || LemonWay.init
end

.configuration=(configuration) ⇒ Object



28
29
30
31
32
# File 'lib/lemonway_ruby.rb', line 28

def self.configuration=(configuration)
  @@configuration = configuration

  LemonWay.init
end

.initObject



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

def self.init
  @@client = Client.new(@@configuration)
end

.resetObject



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

def self.reset
  @@client = nil
  @@configuration = {}
end