Class: DACPClient::Status
- Inherits:
-
Model
- Object
- Model
- DACPClient::Status
show all
- Defined in:
- lib/dacpclient/models/status.rb
Instance Method Summary
collapse
Methods inherited from Model
build_dmap, dmap_attribute, dmap_container, dmap_tag, #initialize, #inspect, #method_missing, #respond_to?, #to_dmap, #to_s
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class DACPClient::Model
Instance Method Details
#paused? ⇒ Boolean
39
40
41
|
# File 'lib/dacpclient/models/status.rb', line 39
def paused?
!stopped? && !playing?
end
|
#playing? ⇒ Boolean
35
36
37
|
# File 'lib/dacpclient/models/status.rb', line 35
def playing?
play_status == 4
end
|
#song_position ⇒ Object
26
27
28
29
|
# File 'lib/dacpclient/models/status.rb', line 26
def song_position
return 0 unless song_length? && song_remaining_time?
song_length - song_remaining_time
end
|
#stopped? ⇒ Boolean
31
32
33
|
# File 'lib/dacpclient/models/status.rb', line 31
def stopped?
play_status == 2
end
|