Module: Webmaster

Defined in:
lib/webmaster.rb,
lib/webmaster/base.rb,
lib/webmaster/host.rb,
lib/webmaster/client.rb,
lib/webmaster/errors.rb,
lib/webmaster/version.rb,
lib/webmaster/api/request.rb,
lib/webmaster/configuration.rb,
lib/webmaster/api/connection.rb,
lib/webmaster/hosts/crawling.rb,
lib/webmaster/request/oauth2.rb,
lib/webmaster/response/hashify.rb,
lib/webmaster/api/authorization.rb,
lib/webmaster/hosts/verification.rb

Defined Under Namespace

Modules: Api, Errors, Hosts, Request, Response, Version Classes: Base, Client, Configuration, Host

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

config/initializers/webmaster.rb (for instance)

Webmaster.configure do |config|

config.application_id = 'application_id'
config.application_password = 'application_password'

end

elsewhere

client = Webmaster::Client.new

Yields:

  • (_self)

Yield Parameters:

  • _self (Webmaster)

    the object that the method was called on



42
43
44
45
# File 'lib/webmaster.rb', line 42

def configure
  yield self
  true
end

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

Delegate to Webmaster::Client



22
23
24
25
# File 'lib/webmaster.rb', line 22

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

.new(options = {}, &block) ⇒ Github::Client

Alias for Webmaster::Client.new

Returns:

  • (Github::Client)


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

def new(options = {}, &block)
  Webmaster::Client.new(:configuration => options, &block)
end

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

Returns:

  • (Boolean)


27
28
29
# File 'lib/webmaster.rb', line 27

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