Class: DuoRuby::Channel::Handler

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

Overview

Internal record tying a block to its event and once-flag. The value returned by #on and #one is a Handler; pass it to #off to remove that specific registration.

Instance Attribute Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



35
36
37
# File 'lib/duoruby/channel.rb', line 35

def block
  @block
end

#eventObject

Returns the value of attribute event

Returns:

  • (Object)

    the current value of event



35
36
37
# File 'lib/duoruby/channel.rb', line 35

def event
  @event
end

#onceObject

Returns the value of attribute once

Returns:

  • (Object)

    the current value of once



35
36
37
# File 'lib/duoruby/channel.rb', line 35

def once
  @once
end