Class: AeRssMaker::Momorikobuta
- Inherits:
-
Object
- Object
- AeRssMaker::Momorikobuta
- Defined in:
- lib/ae_rss_maker/momorikobuta/fetch.rb
Class Method Summary collapse
Instance Method Summary collapse
- #fetch(id, password) ⇒ Object
-
#initialize ⇒ Momorikobuta
constructor
A new instance of Momorikobuta.
Constructor Details
#initialize ⇒ Momorikobuta
Returns a new instance of Momorikobuta.
5 6 7 |
# File 'lib/ae_rss_maker/momorikobuta/fetch.rb', line 5 def initialize @agent = Mechanize.new end |
Class Method Details
.fetch(id, password) ⇒ Object
9 10 11 |
# File 'lib/ae_rss_maker/momorikobuta/fetch.rb', line 9 def self.fetch(id, password) Momorikobuta.new.fetch(id, password) end |
Instance Method Details
#fetch(id, password) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ae_rss_maker/momorikobuta/fetch.rb', line 13 def fetch(id, password) login(id, password) feeds = [] diary_list.each do |node| feed = Feed.new feed.title = title(node) feed.url = url(node) feed.date = date(node) feed.description = description(feed.url) feeds.push(feed) end feeds end |