Module: Wombat::Processing::Parser

Included in:
Crawler
Defined in:
lib/wombat/processing/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context.



10
11
12
# File 'lib/wombat/processing/parser.rb', line 10

def context
  @context
end

#mechanizeObject

Returns the value of attribute mechanize.



10
11
12
# File 'lib/wombat/processing/parser.rb', line 10

def mechanize
  @mechanize
end

#pageObject

Returns the value of attribute page.



10
11
12
# File 'lib/wombat/processing/parser.rb', line 10

def page
  @page
end

#response_codeObject

Returns the value of attribute response_code.



10
11
12
# File 'lib/wombat/processing/parser.rb', line 10

def response_code
  @response_code
end

Instance Method Details

#initializeObject



12
13
14
# File 'lib/wombat/processing/parser.rb', line 12

def initialize
  @mechanize = Mechanize.new
end

#parse(metadata) ⇒ Object



16
17
18
19
20
# File 'lib/wombat/processing/parser.rb', line 16

def parse()
  @context = parser_for 

  Wombat::Property::Locators::Factory.locator_for().locate(@context, @mechanize)
end