Class: Rockbox::Api::SavedPlaylists::CreateBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/rockbox/api/saved_playlists.rb

Overview

Builder for #create — supports the optional yield-block DSL.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, description, image, folder_id, track_ids) ⇒ CreateBuilder

Returns a new instance of CreateBuilder.



143
144
145
146
147
148
149
# File 'lib/rockbox/api/saved_playlists.rb', line 143

def initialize(name, description, image, folder_id, track_ids)
  @name = name
  @description = description
  @image = image
  @folder_id = folder_id
  @track_ids = track_ids
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



141
142
143
# File 'lib/rockbox/api/saved_playlists.rb', line 141

def description
  @description
end

#folder_idObject

Returns the value of attribute folder_id.



141
142
143
# File 'lib/rockbox/api/saved_playlists.rb', line 141

def folder_id
  @folder_id
end

#imageObject

Returns the value of attribute image.



141
142
143
# File 'lib/rockbox/api/saved_playlists.rb', line 141

def image
  @image
end

#nameObject

Returns the value of attribute name.



141
142
143
# File 'lib/rockbox/api/saved_playlists.rb', line 141

def name
  @name
end

#track_idsObject

Returns the value of attribute track_ids.



141
142
143
# File 'lib/rockbox/api/saved_playlists.rb', line 141

def track_ids
  @track_ids
end

Instance Method Details

#to_variablesObject



151
152
153
154
155
156
157
158
159
# File 'lib/rockbox/api/saved_playlists.rb', line 151

def to_variables
  {
    name: name,
    description: description,
    image: image,
    folder_id: folder_id,
    track_ids: track_ids
  }.compact
end