Module: Genability

Extended by:
Configuration
Defined in:
lib/genability/api.rb,
lib/genability.rb,
lib/genability/error.rb,
lib/genability/client.rb,
lib/genability/request.rb,
lib/genability/connection.rb,
lib/genability/client/echo.rb,
lib/genability/client/price.rb,
lib/genability/client/season.rb,
lib/genability/client/tariff.rb,
lib/genability/configuration.rb,
lib/genability/client/helpers.rb,
lib/genability/client/property.rb,
lib/genability/client/zip_code.rb,
lib/genability/client/calculate.rb,
lib/genability/client/territory.rb,
lib/genability/client/time_of_use.rb,
lib/genability/client/load_serving_entity.rb

Overview

require File.expand_path('../oauth', FILE)

Defined Under Namespace

Modules: Configuration, Request Classes: BadRequest, Client, Error, Forbidden, InvalidInput, NotFound, ServerError, ServiceUnavailable

Constant Summary

Constants included from Configuration

Configuration::DEFAULT_ADAPTER, Configuration::DEFAULT_APPLICATION_ID, Configuration::DEFAULT_APPLICATION_KEY, Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_FORMAT, Configuration::DEFAULT_PROXY, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_FORMATS, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.client(options = {}) ⇒ Genability::Client

Alias for Genability::Client.new

Returns:



15
16
17
# File 'lib/genability.rb', line 15

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

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

Delegate to Genability::Client



20
21
22
23
# File 'lib/genability.rb', line 20

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

.respond_to?(method) ⇒ Boolean

Delegate to Genability::Client

Returns:

  • (Boolean)


26
27
28
# File 'lib/genability.rb', line 26

def self.respond_to?(method)
  return client.respond_to?(method) || super
end