Class: Icecast::Server::StreamStatus
- Inherits:
-
Object
- Object
- Icecast::Server::StreamStatus
- Defined in:
- lib/icecast/server.rb
Instance Attribute Summary collapse
-
#parsed_status ⇒ Object
Returns the value of attribute parsed_status.
Instance Method Summary collapse
-
#initialize(parsed_status) ⇒ StreamStatus
constructor
A new instance of StreamStatus.
- #listeners ⇒ Object
- #started? ⇒ Boolean
Constructor Details
#initialize(parsed_status) ⇒ StreamStatus
Returns a new instance of StreamStatus.
84 85 86 |
# File 'lib/icecast/server.rb', line 84 def initialize(parsed_status) @parsed_status = parsed_status end |
Instance Attribute Details
#parsed_status ⇒ Object
Returns the value of attribute parsed_status.
82 83 84 |
# File 'lib/icecast/server.rb', line 82 def parsed_status @parsed_status end |
Instance Method Details
#listeners ⇒ Object
92 93 94 |
# File 'lib/icecast/server.rb', line 92 def listeners started? ? parsed_status["listeners"].to_i : 0 end |
#started? ⇒ Boolean
88 89 90 |
# File 'lib/icecast/server.rb', line 88 def started? parsed_status.present? end |