Module: Bitreserve::Options
- Included in:
- Client
- Defined in:
- lib/bitreserve/options.rb
Constant Summary collapse
- API_BASE =
'https://api.bitreserve.org'- SANDBOX_API_BASE =
'https://api-sandbox.bitreserve.org'
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/bitreserve/options.rb', line 3 def end |
Instance Method Details
#authorization_header ⇒ Object
15 16 17 18 19 |
# File 'lib/bitreserve/options.rb', line 15 def return {} unless bearer_token? { 'Authorization' => "Bearer #{bearer_token}" } end |
#bearer_token ⇒ Object
11 12 13 |
# File 'lib/bitreserve/options.rb', line 11 def bearer_token @bearer_token ||= ([:token] || ENV['BITRESERVE_AUTH_TOKEN']) end |
#bearer_token? ⇒ Boolean
7 8 9 |
# File 'lib/bitreserve/options.rb', line 7 def bearer_token? !bearer_token.nil? end |