Class: LondonCab::Auth::Client

Inherits:
Object
  • Object
show all
Includes:
Api::Endpoints, Faraday::Connection, Faraday::Request
Defined in:
lib/london_cab_auth/client.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Api::Endpoints::Auth

#auth

Methods included from Faraday::Request

#delete, #get, #post, #put

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



10
11
12
13
14
15
16
# File 'lib/london_cab_auth/client.rb', line 10

def initialize(options = {})
  LondonCab::Auth::Config::ATTRIBUTES.each do |key|
    send("#{key}=", options[key] || LondonCab::Auth.config.send(key))
  end

  @logger ||= LondonCab::Auth::Config.logger || LondonCab::Auth::Logger.default
end

Class Method Details

.configObject



23
24
25
# File 'lib/london_cab_auth/client.rb', line 23

def config
  Config
end

.configureObject



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

def configure
  block_given? ? yield(Config) : Config
end