Class: Howkast::Processor::Users
- Defined in:
- lib/howkast/processors/users.rb
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.default_for(field) ⇒ Object
43 44 45 |
# File 'lib/howkast/processors/users.rb', line 43 def default_for field [] if %w{ playlists videos }.include? field end |
.filter(args, options) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/howkast/processors/users.rb', line 26 def filter args, args << .delete(:id) args << :profile args << Array(.delete(:resource)) args.compact! end |
.parse_element(data) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/howkast/processors/users.rb', line 33 def parse_element data = ->(key, value){ key, value } if data.has_key? 'records' data['playlists'] = nil data.delete 'records' end klass = Howkast::Model.synthesize('User', data) klass.new self, data, & end |