Class: MultipleMan::ChannelMaintenance::GC::AddCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/multiple_man/channel_maintenance/gc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(thread_id, channel) ⇒ AddCommand

Returns a new instance of AddCommand.



60
61
62
63
# File 'lib/multiple_man/channel_maintenance/gc.rb', line 60

def initialize(thread_id, channel)
  @thread_id = thread_id
  @channel = channel
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



58
59
60
# File 'lib/multiple_man/channel_maintenance/gc.rb', line 58

def channel
  @channel
end

#thread_idObject (readonly)

Returns the value of attribute thread_id.



58
59
60
# File 'lib/multiple_man/channel_maintenance/gc.rb', line 58

def thread_id
  @thread_id
end

Instance Method Details

#execute(channels_by_thread) ⇒ Object



65
66
67
# File 'lib/multiple_man/channel_maintenance/gc.rb', line 65

def execute(channels_by_thread)
  channels_by_thread[thread_id] << channel
end