Class: GoogleAjaxCrawler::Options
- Inherits:
-
Object
- Object
- GoogleAjaxCrawler::Options
- Defined in:
- lib/google_ajax_crawler/options.rb
Instance Attribute Summary collapse
-
#driver ⇒ Object
Returns the value of attribute driver.
-
#page_loaded_js ⇒ Object
Returns the value of attribute page_loaded_js.
-
#page_loaded_test ⇒ Object
Returns the value of attribute page_loaded_test.
-
#poll_interval ⇒ Object
Returns the value of attribute poll_interval.
-
#requested_route_key ⇒ Object
Returns the value of attribute requested_route_key.
-
#response_headers ⇒ Object
Returns the value of attribute response_headers.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(app, &block) ⇒ Options
constructor
A new instance of Options.
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
#driver ⇒ Object
Returns the value of attribute driver.
3 4 5 |
# File 'lib/google_ajax_crawler/options.rb', line 3 def driver @driver end |
#page_loaded_js ⇒ Object
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_test ⇒ Object
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_interval ⇒ Object
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_key ⇒ Object
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_headers ⇒ Object
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 |
#timeout ⇒ Object
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/google_ajax_crawler/options.rb', line 3 def timeout @timeout end |