Class: Howkast::Processor::Playlists
- Defined in:
- lib/howkast/processors/playlists.rb
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.default_for(field) ⇒ Object
36 37 38 |
# File 'lib/howkast/processors/playlists.rb', line 36 def default_for field [] if %w{ playlists videos }.include? field end |
.filter(args, options) ⇒ Object
20 21 22 23 24 |
# File 'lib/howkast/processors/playlists.rb', line 20 def filter args, args << .delete(:id) args.compact! = { } end |
.parse_element(data) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/howkast/processors/playlists.rb', line 26 def parse_element data = ->(key, value){ key, value } if data.has_key? 'playlists' parse_list 'playlist', data['playlists'], & else klass = Howkast::Model.synthesize('Playlist', data) klass.new self, data, & end end |