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 |
# File 'lib/wombat/processing/parser.rb', line 20 def initialize @mechanize = Mechanize.new end |
#parse(metadata) ⇒ Object
28 29 30 31 32 |
# File 'lib/wombat/processing/parser.rb', line 28 def parse() @context = parser_for Wombat::Property::Locators::Factory.locator_for().locate(@context, @mechanize) end |
#set_proxy(host, port) ⇒ Object
24 25 26 |
# File 'lib/wombat/processing/parser.rb', line 24 def set_proxy(host, port) @mechanize.set_proxy host, port end |