Module: MercuryWebParser

Extended by:
Configuration
Defined in:
lib/mercury_web_parser.rb,
lib/mercury_web_parser/error.rb,
lib/mercury_web_parser/client.rb,
lib/mercury_web_parser/article.rb,
lib/mercury_web_parser/request.rb,
lib/mercury_web_parser/version.rb,
lib/mercury_web_parser/connection.rb,
lib/mercury_web_parser/api/content.rb,
lib/mercury_web_parser/configuration.rb

Defined Under Namespace

Modules: API, Configuration, Connection, Request Classes: Article, Client, Error

Constant Summary collapse

VERSION =
'0.1.2'.freeze

Constants included from Configuration

Configuration::DEFAULT_API_ENDPOINT, Configuration::DEFAULT_API_TOKEN, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_CONFIG_KEYS, Configuration::VALID_CONNECTION_KEYS, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset!

Class Method Details

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

Delegate to MercuryWebParser::Client



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

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

.new(options = {}) ⇒ MercuryWebParser::Client

Alias for MercuryWebParser::Client.new



11
12
13
# File 'lib/mercury_web_parser.rb', line 11

def new(options = {})
  MercuryWebParser::Client.new(options)
end

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

Returns:

  • (Boolean)


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

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

.respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/mercury_web_parser.rb', line 25

def respond_to_missing?(method_name, include_private = false)
  Configuration::VALID_CONFIG_KEYS.include?(method_name) || super
end