module Bitreserve::Options

Constants

API_BASE
SANDBOX_API_BASE

Attributes

options[R]

Public Instance Methods

authorization_header() click to toggle source
# File lib/bitreserve/options.rb, line 15
def authorization_header
  return {} unless bearer_token?

  { 'Authorization' => "Bearer #{bearer_token}" }
end
bearer_token() click to toggle source
# File lib/bitreserve/options.rb, line 11
def bearer_token
  @bearer_token ||= (options[:token] || ENV['BITRESERVE_AUTH_TOKEN'])
end
bearer_token?() click to toggle source
# File lib/bitreserve/options.rb, line 7
def bearer_token?
  !bearer_token.nil?
end