Module: AP

Extended by:
Configuration
Defined in:
lib/ap.rb,
lib/ap/api.rb,
lib/ap/client.rb,
lib/ap/search.rb,
lib/ap/article.rb,
lib/ap/version.rb,
lib/ap/category.rb,
lib/ap/configuration.rb,
lib/ap/client/category.rb

Defined Under Namespace

Modules: Configuration Classes: API, Article, Category, Client, Search

Constant Summary collapse

VERSION =
'0.1.1'.freeze

Constants included from Configuration

Configuration::DEFAULT_API_KEY, Configuration::DEFAULT_SEARCH_SETTINGS, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.client(options = {}) ⇒ Object

Alias for AP::Client.new



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

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

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



23
24
25
26
# File 'lib/ap.rb', line 23

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

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

Returns:

  • (Boolean)


28
29
30
# File 'lib/ap.rb', line 28

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