Class: DoingStream::Stream::FeedStream

Inherits:
Stream
  • Object
show all
Defined in:
lib/doing_stream/stream/feed_stream.rb

Direct Known Subclasses

DoingStream::Streams::Pinboard

Instance Attribute Summary

Attributes inherited from Stream

#user

Instance Method Summary collapse

Methods inherited from Stream

#entry_class, #initialize, #name, #uri

Constructor Details

This class inherits a constructor from DoingStream::Stream::Stream

Instance Method Details

#entriesObject



9
10
11
12
13
# File 'lib/doing_stream/stream/feed_stream.rb', line 9

def entries
  @entries ||= feed.entries.map do |entry|
    entry_class.new(name, Hash[entry.to_a])
  end
end

#feedObject



5
6
7
# File 'lib/doing_stream/stream/feed_stream.rb', line 5

def feed
  @feed ||= Feedzirra::Feed.fetch_and_parse uri.to_s
end