Module: Postmates

Extended by:
Configuration
Defined in:
lib/PostmatesRuby.rb,
lib/Postmates/error.rb,
lib/Postmates/client.rb,
lib/Postmates/request.rb,
lib/Postmates/version.rb,
lib/Postmates/response.rb,
lib/Postmates/connection.rb,
lib/Postmates/objects/base.rb,
lib/Postmates/configuration.rb,
lib/Postmates/client/delivery.rb,
lib/Postmates/objects/delivery.rb,
lib/Postmates/client/delivery_quote.rb,
lib/Postmates/objects/delivery_quote.rb

Defined Under Namespace

Modules: Configuration, Connection, Objects, Request, Response Classes: BadRequest, Client, Error, InternalServerError, NotFound, ServiceUnavailable, Unauthorized

Constant Summary collapse

VERSION =
'0.0.3'.freeze

Constants included from Configuration

Configuration::DEFAULT_ADAPTER, Configuration::DEFAULT_API_KEY, Configuration::DEFAULT_API_VERSION, Configuration::DEFAULT_CUSTOMER_ID, Configuration::DEFAULT_ENDPOINT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.client(options = {}) ⇒ Object



8
9
10
# File 'lib/PostmatesRuby.rb', line 8

def self.client(options={})
  Postmates::Client.new(options)
end

.method_missing(method, *args, &block) ⇒ Object



12
13
14
15
# File 'lib/PostmatesRuby.rb', line 12

def self.method_missing(method, *args, &block)
  return super unless client.respond_to?(method)
  client.send(method, *args, &block)
end

.respond_to?(method, include_all = false) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/PostmatesRuby.rb', line 17

def self.respond_to?(method, include_all=false)
  return client.respond_to?(method, include_all) || super
end