Class: Hypem::Track
Instance Attribute Summary collapse
-
#media_id ⇒ Object
Returns the value of attribute media_id.
Instance Method Summary collapse
- #favorites(page = nil) ⇒ Object
- #get ⇒ Object
-
#initialize(arg) ⇒ Track
constructor
A new instance of Track.
Methods included from Helper
included, #update_from_response
Constructor Details
#initialize(arg) ⇒ Track
Returns a new instance of Track.
24 25 26 27 28 29 30 31 32 |
# File 'lib/hypem/track.rb', line 24 def initialize(arg) if arg.is_a? Hash update_from_response arg elsif arg.is_a? String @media_id = arg else raise end end |
Instance Attribute Details
#media_id ⇒ Object
Returns the value of attribute media_id.
5 6 7 |
# File 'lib/hypem/track.rb', line 5 def media_id @media_id end |
Instance Method Details
#favorites(page = nil) ⇒ Object
40 41 42 |
# File 'lib/hypem/track.rb', line 40 def favorites(page=nil) @track_favorites ||= TrackFavorites.new(@media_id) end |