Class: Qtunes::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Qtunes::Server
- Defined in:
- lib/qtunes/server.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.library ⇒ Object
71 72 73 74 75 76 77 78 |
# File 'lib/qtunes/server.rb', line 71 def self.library @library ||= begin print "Loading library..." result = songs_to_hash{ player.library } puts "Done" result end end |
.player ⇒ Object
55 56 57 |
# File 'lib/qtunes/server.rb', line 55 def self.player @player ||= Qtunes::Player.new end |
.queue ⇒ Object
63 64 65 |
# File 'lib/qtunes/server.rb', line 63 def self.queue songs_to_hash{ player.queue } end |
Instance Method Details
#library ⇒ Object
80 81 82 |
# File 'lib/qtunes/server.rb', line 80 def library self.class.library end |
#player ⇒ Object
59 60 61 |
# File 'lib/qtunes/server.rb', line 59 def player self.class.player end |
#queue ⇒ Object
67 68 69 |
# File 'lib/qtunes/server.rb', line 67 def queue self.class.queue end |