Class: FFWD::Channel::Sub

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel, block) ⇒ Sub

Returns a new instance of Sub.



24
25
26
27
# File 'lib/ffwd/channel.rb', line 24

def initialize channel, block
  @channel = channel
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



22
23
24
# File 'lib/ffwd/channel.rb', line 22

def block
  @block
end

#channelObject (readonly)

Returns the value of attribute channel.



22
23
24
# File 'lib/ffwd/channel.rb', line 22

def channel
  @channel
end

Instance Method Details

#unsubscribeObject



29
30
31
# File 'lib/ffwd/channel.rb', line 29

def unsubscribe
  @channel.unsubscribe self
end