Class: Channel

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

Overview

The Channel class is used to represent a channel in for a GRIP proxy and tracks the previous ID of the last message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, prev_id = nil) ⇒ Channel

Initialize with the channel name and an optional previous ID.



15
16
17
18
# File 'lib/channel.rb', line 15

def initialize(name, prev_id=nil)
  @name = name
  @prev_id = prev_id
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/channel.rb', line 11

def name
  @name
end

#prev_idObject

Returns the value of attribute prev_id.



12
13
14
# File 'lib/channel.rb', line 12

def prev_id
  @prev_id
end