Method: Logplex::Client#channel
- Defined in:
- lib/logplex/client.rb
#channel(channel_id) ⇒ Object
Public: Get a Logplex::Channel instance with a given id.
If you have already created a channel, this is how you access it later.
channel_id - the channel id (number)
Returns a Logplex::Channel Raises TODO(sissel): ??? if the channel is not found
59 60 61 62 63 64 65 66 |
# File 'lib/logplex/client.rb', line 59 def channel(channel_id) # This will throw an exception if it doesn't exist. result = @backend.get_channel(channel_id) chan = Logplex::Channel.new(@url, channel_id) # Hack for now to push the result of get_channel into the Channel. chan.instance_eval { @info = result } return chan end |