Class: Java::DeFelixbrunsJotifyMedia::Result
- Inherits:
-
Object
- Object
- Java::DeFelixbrunsJotifyMedia::Result
- Includes:
- Enumerable
- Defined in:
- lib/jotify/media.rb
Instance Method Summary collapse
Instance Method Details
#each(&block) ⇒ Object
72 73 74 75 76 |
# File 'lib/jotify/media.rb', line 72 def each(&block) artists.each(&block) tracks.each(&block) albums.each(&block) end |
#inspect ⇒ Object
78 79 80 |
# File 'lib/jotify/media.rb', line 78 def inspect { :artists=>self.artists.to_a, :albums=>self.albums.to_a, :tracks=>self.tracks.to_a }.inspect end |
#to_h ⇒ Object
82 83 84 85 86 87 88 |
# File 'lib/jotify/media.rb', line 82 def to_h { :artists => self.artists.map { |a| a.to_h }, :albums => self.albums.map { |a| a.to_h }, :tracks => self.tracks.map { |t| t.to_h } } end |