Module: Mitake
- Defined in:
- lib/mitake.rb,
lib/mitake/api.rb,
lib/mitake/model.rb,
lib/mitake/parser.rb,
lib/mitake/status.rb,
lib/mitake/api/get.rb,
lib/mitake/balance.rb,
lib/mitake/boolean.rb,
lib/mitake/message.rb,
lib/mitake/version.rb,
lib/mitake/api/base.rb,
lib/mitake/api/post.rb,
lib/mitake/response.rb,
lib/mitake/recipient.rb,
lib/mitake/credential.rb,
lib/mitake/status_code.rb,
lib/mitake/model/accessor.rb,
lib/mitake/model/attributes.rb
Overview
The Mitake API Client
Defined Under Namespace
Modules: API, Model, Status Classes: Balance, Boolean, Credential, Message, Parser, Recipient, Response, StatusCode
Constant Summary collapse
- LOCK =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Mutex.new
- VERSION =
'0.1.2'
Class Method Summary collapse
-
.credential ⇒ Mitake::Credential
The credential.
-
.credential=(credential) ⇒ Object
Set credential.
-
.use(credential, &_block) ⇒ Object
Switch credential.
Class Method Details
.credential ⇒ Mitake::Credential
The credential
36 37 38 |
# File 'lib/mitake.rb', line 36 def self.credential @credential ||= Credential.new end |
.credential=(credential) ⇒ Object
Set credential
45 46 47 |
# File 'lib/mitake.rb', line 45 def self.credential=(credential) @credential = credential end |
.use(credential, &_block) ⇒ Object
Switch credential
22 23 24 25 26 27 28 29 |
# File 'lib/mitake.rb', line 22 def self.use(credential, &_block) temp = credential LOCK.synchronize do self.credential = credential yield self.credential = temp end end |