Class: GoogleAjaxCrawler::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/google_ajax_crawler/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, &block) ⇒ Options

Returns a new instance of Options.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/google_ajax_crawler/options.rb', line 5

def initialize(app, &block)
  @driver  = Drivers::CapybaraWebkit.new(self)
  @timeout = 30
  @requested_route_key  = '_escaped_fragment_'
  @response_headers     = { 'Content-Type' => 'text/html' }
  @poll_interval        = 0.5

  instance_exec(self, &block) unless block.nil?

  @app = app
end

Instance Attribute Details

#driverObject

Returns the value of attribute driver.



3
4
5
# File 'lib/google_ajax_crawler/options.rb', line 3

def driver
  @driver
end

#page_loaded_jsObject

Returns the value of attribute page_loaded_js.



3
4
5
# File 'lib/google_ajax_crawler/options.rb', line 3

def page_loaded_js
  @page_loaded_js
end

#page_loaded_testObject

Returns the value of attribute page_loaded_test.



3
4
5
# File 'lib/google_ajax_crawler/options.rb', line 3

def page_loaded_test
  @page_loaded_test
end

#poll_intervalObject

Returns the value of attribute poll_interval.



3
4
5
# File 'lib/google_ajax_crawler/options.rb', line 3

def poll_interval
  @poll_interval
end

#requested_route_keyObject

Returns the value of attribute requested_route_key.



3
4
5
# File 'lib/google_ajax_crawler/options.rb', line 3

def requested_route_key
  @requested_route_key
end

#response_headersObject

Returns the value of attribute response_headers.



3
4
5
# File 'lib/google_ajax_crawler/options.rb', line 3

def response_headers
  @response_headers
end

#timeoutObject

Returns the value of attribute timeout.



3
4
5
# File 'lib/google_ajax_crawler/options.rb', line 3

def timeout
  @timeout
end