Module: Squeezer
- Extended by:
- Configuration
- Defined in:
- lib/squeezer.rb,
lib/squeezer/api.rb,
lib/squeezer/client.rb,
lib/squeezer/models.rb,
lib/squeezer/version.rb,
lib/squeezer/connection.rb,
lib/squeezer/client/utils.rb,
lib/squeezer/models/album.rb,
lib/squeezer/models/genre.rb,
lib/squeezer/models/track.rb,
lib/squeezer/configuration.rb,
lib/squeezer/models/artist.rb,
lib/squeezer/models/player.rb,
lib/squeezer/client/general.rb,
lib/squeezer/client/players.rb,
lib/squeezer/client/database.rb,
lib/squeezer/client/playlist.rb,
lib/squeezer/models/playlist.rb
Defined Under Namespace
Modules: Configuration, Connection, Models Classes: API, Client
Constant Summary collapse
- VERSION =
The version of the gem
'0.2.0'.freeze
Constants included from Configuration
Configuration::DEFAULT_PORT, Configuration::DEFAULT_SERVER, Configuration::VALID_OPTIONS_KEYS
Class Method Summary collapse
-
.client(options = {}) ⇒ Squeezer::Client
Alias for Squeezer::Client.new.
-
.method_missing(method, *args, &block) ⇒ Object
Delegate to Squeezer::Client.
-
.open(&block) ⇒ Object
Convenience method to execute client calls in a block.
Methods included from Configuration
configure, extended, options, reset
Class Method Details
.client(options = {}) ⇒ Squeezer::Client
Alias for Squeezer::Client.new
15 16 17 |
# File 'lib/squeezer.rb', line 15 def self.client(={}) Squeezer::Client.new() end |
.method_missing(method, *args, &block) ⇒ Object
Delegate to Squeezer::Client
20 21 22 23 |
# File 'lib/squeezer.rb', line 20 def self.method_missing(method, *args, &block) return super unless client.respond_to?(method) client.send(method, *args, &block) end |
.open(&block) ⇒ Object
Convenience method to execute client calls in a block. The connection closes automatically at the end of the block.
27 28 29 30 |
# File 'lib/squeezer.rb', line 27 def self.open(&block) client.instance_eval(&block) Squeezer.exit end |