Module: PipeDream::Result
- Defined in:
- lib/pipe_dream/result.rb,
lib/pipe_dream/results/base.rb,
lib/pipe_dream/results/video.rb,
lib/pipe_dream/results/channel.rb,
lib/pipe_dream/results/playlist.rb
Defined Under Namespace
Classes: Base, Channel, Playlist, Video
Class Method Summary
collapse
Class Method Details
.for(item) ⇒ Object
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/pipe_dream/result.rb', line 3
def self.for(item)
case item.dig('id', 'kind')
when 'youtube#channel'
Channel
when 'youtube#playlist'
Playlist
when 'youtube#video'
Video
end.new(item)
end
|