Module: Wombat::Processing::Parser
- Included in:
- Crawler
- Defined in:
- lib/wombat/processing/parser.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#mechanize ⇒ Object
Returns the value of attribute mechanize.
-
#page ⇒ Object
Returns the value of attribute page.
-
#response_code ⇒ Object
Returns the value of attribute response_code.
Instance Method Summary collapse
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
18 19 20 |
# File 'lib/wombat/processing/parser.rb', line 18 def context @context end |
#mechanize ⇒ Object
Returns the value of attribute mechanize.
18 19 20 |
# File 'lib/wombat/processing/parser.rb', line 18 def mechanize @mechanize end |
#page ⇒ Object
Returns the value of attribute page.
18 19 20 |
# File 'lib/wombat/processing/parser.rb', line 18 def page @page end |
#response_code ⇒ Object
Returns the value of attribute response_code.
18 19 20 |
# File 'lib/wombat/processing/parser.rb', line 18 def response_code @response_code end |
Instance Method Details
#initialize ⇒ Object
20 21 22 23 |
# File 'lib/wombat/processing/parser.rb', line 20 def initialize @mechanize = Mechanize.new @mechanize.set_proxy(*Wombat.proxy_args) if Wombat.proxy_args end |
#parse(metadata) ⇒ Object
25 26 27 28 29 |
# File 'lib/wombat/processing/parser.rb', line 25 def parse() @context = parser_for Wombat::Property::Locators::Factory.locator_for().locate(@context, @mechanize) end |