Module: Distribot::Handler::ClassMethods

Defined in:
lib/distribot/handler.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.handlerObject

Returns the value of attribute handler.



29
30
31
# File 'lib/distribot/handler.rb', line 29

def handler
  @handler
end

.queueObject

Returns the value of attribute queue.



29
30
31
# File 'lib/distribot/handler.rb', line 29

def queue
  @queue
end

.subscribe_argsObject

Returns the value of attribute subscribe_args.



29
30
31
# File 'lib/distribot/handler.rb', line 29

def subscribe_args
  @subscribe_args
end

Instance Attribute Details

#handlerObject (readonly)

Returns the value of attribute handler.



31
32
33
# File 'lib/distribot/handler.rb', line 31

def handler
  @handler
end

#queueObject (readonly)

Returns the value of attribute queue.



31
32
33
# File 'lib/distribot/handler.rb', line 31

def queue
  @queue
end

#subscribe_argsObject (readonly)

Returns the value of attribute subscribe_args.



31
32
33
# File 'lib/distribot/handler.rb', line 31

def subscribe_args
  @subscribe_args
end

Instance Method Details

#subscribe_to(queue_name, handler_args) ⇒ Object



33
34
35
36
37
# File 'lib/distribot/handler.rb', line 33

def subscribe_to(queue_name, handler_args)
  @queue = queue_name
  @handler = handler_args.delete :handler
  @subscribe_args = handler_args
end