Class: DoingStream::Streams::Vimeo
- Inherits:
-
DoingStream::Stream::Stream
- Object
- DoingStream::Stream::Stream
- DoingStream::Streams::Vimeo
- Defined in:
- lib/doing_stream/streams/vimeo.rb
Defined Under Namespace
Instance Attribute Summary
Attributes inherited from DoingStream::Stream::Stream
Instance Method Summary collapse
- #entries ⇒ Object
-
#initialize(user) ⇒ Vimeo
constructor
A new instance of Vimeo.
Methods inherited from DoingStream::Stream::Stream
Constructor Details
Instance Method Details
#entries ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/doing_stream/streams/vimeo.rb', line 8 def entries @entries ||= begin (@likes.entries + @videos.entries).sort_by(&:published).reverse.each do |entry| class << entry; alias_method :type, :name; end entry.define_singleton_method(:name) { "vimeo" } def entry.to_h; super.tap { |h| h['data']['type'] = type }; end end end end |