Class: ShoutcastStatus::StreamInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/shoutcast_status.rb

Instance Method Summary collapse

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

#artistObject



44
45
46
# File 'lib/shoutcast_status.rb', line 44

def artist
  artist_and_title.first
end

#bitrateObject



64
65
66
# File 'lib/shoutcast_status.rb', line 64

def bitrate
  @object["bitrate"]
end

#listenersObject



52
53
54
# File 'lib/shoutcast_status.rb', line 52

def listeners
  @object["listeners"]
end

#max_listenersObject



56
57
58
# File 'lib/shoutcast_status.rb', line 56

def max_listeners
  @object["maxlisteners"]
end

#stationObject



60
61
62
# File 'lib/shoutcast_status.rb', line 60

def station
  @object["title"]
end

#titleObject



48
49
50
# File 'lib/shoutcast_status.rb', line 48

def title
  artist_and_title.last
end

#urlObject



68
69
70
# File 'lib/shoutcast_status.rb', line 68

def url
  @object["url"]
end