Class: YouTube::YouTubePlaylist
- Inherits:
-
Object
- Object
- YouTube::YouTubePlaylist
- Defined in:
- lib/share_learning/youtube_playlist.rb
Overview
Playlist on Youtube
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data: nil) ⇒ YouTubePlaylist
constructor
A new instance of YouTubePlaylist.
Constructor Details
#initialize(data: nil) ⇒ YouTubePlaylist
Returns a new instance of YouTubePlaylist.
8 9 10 |
# File 'lib/share_learning/youtube_playlist.rb', line 8 def initialize(data: nil) @results = load_data(data) end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
6 7 8 |
# File 'lib/share_learning/youtube_playlist.rb', line 6 def results @results end |
Class Method Details
.find(keyword:) ⇒ Object
12 13 14 15 |
# File 'lib/share_learning/youtube_playlist.rb', line 12 def self.find(keyword:) playlists = YouTube::YouTubeAPI.get_playlist(keyword) new(data: playlists) end |