Class: Java::DeFelixbrunsJotifyMedia::Media

Inherits:
Object
  • Object
show all
Defined in:
lib/jotify/media.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject



8
9
10
# File 'lib/jotify/media.rb', line 8

def inspect
  self.to_s
end

#to_hObject



12
13
14
15
16
# File 'lib/jotify/media.rb', line 12

def to_h
  h = { :id=>self.getId(), :popularity=> popularity.nan? ? 0.0 : popularity.to_f }
  h[:url] = self.link.asHTTPLink if self.respond_to?(:link)
  h
end