Class: RSpotify::Device
Instance Attribute Summary collapse
-
#id ⇒ String
The device ID.
-
#is_active ⇒ Boolean
If this device is the currently active device.
-
#is_restricted ⇒ Boolean
Whether controlling this device is restricted.
-
#name ⇒ String
The name of the device.
-
#type ⇒ String
Device type, such as “Computer”, “Smartphone” or “Speaker”.
-
#volume_percent ⇒ String
The current volume in percent.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Device
constructor
A new instance of Device.
Methods inherited from Base
#complete!, #embed, find, #method_missing, #respond_to?, search
Constructor Details
#initialize(options = {}) ⇒ Device
Returns a new instance of Device.
10 11 12 13 14 15 16 17 |
# File 'lib/rspotify/device.rb', line 10 def initialize( = {}) @id = ['id'] @is_active = ['is_active'] @is_restricted = ['is_restricted'] @name = ['name'] @type = ['type'] @volume_percent = ['volume_percent'] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RSpotify::Base
Instance Attribute Details
#id ⇒ String
The device ID. This may be null
9 10 11 |
# File 'lib/rspotify/device.rb', line 9 def id @id end |
#is_active ⇒ Boolean
If this device is the currently active device
9 10 11 |
# File 'lib/rspotify/device.rb', line 9 def is_active @is_active end |
#is_restricted ⇒ Boolean
Whether controlling this device is restricted. At present if this is “true” then no Web API commands will be accepted by this device.
9 10 11 |
# File 'lib/rspotify/device.rb', line 9 def is_restricted @is_restricted end |
#name ⇒ String
The name of the device
9 10 11 |
# File 'lib/rspotify/device.rb', line 9 def name @name end |
#type ⇒ String
Device type, such as “Computer”, “Smartphone” or “Speaker”.
9 10 11 |
# File 'lib/rspotify/device.rb', line 9 def type @type end |
#volume_percent ⇒ String
The current volume in percent. This may be null
9 10 11 |
# File 'lib/rspotify/device.rb', line 9 def volume_percent @volume_percent end |