Class: Webmaster::Hosts::Crawling

Inherits:
Base show all
Includes:
Virtus
Defined in:
lib/webmaster/hosts/crawling.rb

Constant Summary collapse

STATES =
[
  'indexed',
  'not_indexed',
  'waiting'
].freeze

Constants included from Api::Request

Api::Request::METHODS, Api::Request::METHODS_WITH_BODIES

Constants included from Api::Connection

Api::Connection::ACCEPT, Api::Connection::ACCEPT_CHARSET, Api::Connection::ALLOWED_OPTIONS, Api::Connection::CONTENT_TYPE, Api::Connection::USER_AGENT

Instance Attribute Summary collapse

Attributes inherited from Base

#configuration

Attributes included from Api::Authorization

#scopes

Instance Method Summary collapse

Methods inherited from Base

#arguments, #attributes=, #initialize, #inspect, #method_missing, #set, #with

Methods included from Api::Request

#delete_request, #get_request, #post_request, #put_request, #request

Methods included from Api::Connection

#connection

Methods included from Api::Authorization

#auth_code, #authenticate, #authenticated?, #authorize_url, #oauth, #token

Constructor Details

This class inherits a constructor from Webmaster::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Webmaster::Base

Instance Attribute Details

#hostObject

Returns the value of attribute host.



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

def host
  @host
end

Instance Method Details

#state=(value) ⇒ Object



18
19
20
21
# File 'lib/webmaster/hosts/crawling.rb', line 18

def state=(value)
  value = value.downcase.underscore
  @state = value if STATES.include?(value)
end