Class: Rubarb::Responder

Inherits:
Object
  • Object
show all
Defined in:
lib/rubarb/responder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler, message_id) ⇒ Responder

Returns a new instance of Responder.



5
6
7
8
# File 'lib/rubarb/responder.rb', line 5

def initialize(handler, message_id)
  @handler = handler
  @message_id = message_id
end

Instance Attribute Details

#handlerObject (readonly)

Returns the value of attribute handler.



4
5
6
# File 'lib/rubarb/responder.rb', line 4

def handler
  @handler
end

#message_idObject (readonly)

Returns the value of attribute message_id.



3
4
5
# File 'lib/rubarb/responder.rb', line 3

def message_id
  @message_id
end

Instance Method Details

#conn_idObject



10
11
12
# File 'lib/rubarb/responder.rb', line 10

def conn_id
  @handler.conn_id
end

#reply(*args) ⇒ Object



14
15
16
# File 'lib/rubarb/responder.rb', line 14

def reply(*args)
  @handler.reply(@message_id, *args)
end