Class: ShoutcastStatus::StreamInfo
- Inherits:
-
Object
- Object
- ShoutcastStatus::StreamInfo
- Defined in:
- lib/shoutcast_status.rb
Instance Method Summary collapse
- #artist ⇒ Object
- #bitrate ⇒ Object
-
#initialize(object) ⇒ StreamInfo
constructor
A new instance of StreamInfo.
- #listeners ⇒ Object
- #max_listeners ⇒ Object
- #station ⇒ Object
- #title ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(object) ⇒ StreamInfo
Returns a new instance of StreamInfo.
40 41 42 |
# File 'lib/shoutcast_status.rb', line 40 def initialize(object) @object = object end |
Instance Method Details
#artist ⇒ Object
44 45 46 |
# File 'lib/shoutcast_status.rb', line 44 def artist artist_and_title.first end |
#bitrate ⇒ Object
64 65 66 |
# File 'lib/shoutcast_status.rb', line 64 def bitrate @object["bitrate"] end |
#listeners ⇒ Object
52 53 54 |
# File 'lib/shoutcast_status.rb', line 52 def listeners @object["listeners"] end |
#max_listeners ⇒ Object
56 57 58 |
# File 'lib/shoutcast_status.rb', line 56 def max_listeners @object["maxlisteners"] end |
#station ⇒ Object
60 61 62 |
# File 'lib/shoutcast_status.rb', line 60 def station @object["title"] end |
#title ⇒ Object
48 49 50 |
# File 'lib/shoutcast_status.rb', line 48 def title artist_and_title.last end |
#url ⇒ Object
68 69 70 |
# File 'lib/shoutcast_status.rb', line 68 def url @object["url"] end |