Class: Planetruby2feed::Base

Inherits:
Object
  • Object
show all
Includes:
Parser, Scraper
Defined in:
lib/planetruby2feed.rb

Instance Attribute Summary collapse

Attributes included from Scraper

#webpage

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Parser

#find_posts

Methods included from Scraper

#analyze, #get_page

Constructor Details

#initializeBase

Returns a new instance of Base.



15
16
17
18
19
# File 'lib/planetruby2feed.rb', line 15

def initialize
  @logger = Logger.new(STDOUT)
  @logger.level = Logger::WARN
  @posts = []
end

Instance Attribute Details

#postsObject

Returns the value of attribute posts.



13
14
15
# File 'lib/planetruby2feed.rb', line 13

def posts
  @posts
end

Class Method Details

.run!Object



21
22
23
24
25
26
# File 'lib/planetruby2feed.rb', line 21

def self.run!
  @planet = self.new
  @planet.get_page
  @planet.find_posts
  @planet
end