Class: MultipleMan::ChannelMaintenance::GC::AddCommand
- Inherits:
-
Object
- Object
- MultipleMan::ChannelMaintenance::GC::AddCommand
- Defined in:
- lib/multiple_man/channel_maintenance/gc.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#thread_id ⇒ Object
readonly
Returns the value of attribute thread_id.
Instance Method Summary collapse
- #execute(channels_by_thread) ⇒ Object
-
#initialize(thread_id, channel) ⇒ AddCommand
constructor
A new instance of AddCommand.
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
#channel ⇒ Object (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_id ⇒ Object (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 |