Module: Planetruby2feed::Scraper

Included in:
Base
Defined in:
lib/planetruby2feed/scraper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#webpageObject

Returns the value of attribute webpage.



6
7
8
# File 'lib/planetruby2feed/scraper.rb', line 6

def webpage
  @webpage
end

Instance Method Details

#analyzeObject



8
9
10
# File 'lib/planetruby2feed/scraper.rb', line 8

def analyze
  get_page
end

#get_pageObject



12
13
14
15
16
17
18
# File 'lib/planetruby2feed/scraper.rb', line 12

def get_page
  begin
    @webpage = Nokogiri::HTML(open(Planetruby2feed::URL))
  rescue Exception => e
    @logger.fatal e.message
  end
end