Class: HrrRbSsh::Connection::RequestHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/hrr_rb_ssh/connection/request_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ RequestHandler

Returns a new instance of RequestHandler.



9
10
11
12
# File 'lib/hrr_rb_ssh/connection/request_handler.rb', line 9

def initialize &block
  @logger = HrrRbSsh::Logger.new self.class.name
  @proc = block
end

Instance Method Details

#run(context) ⇒ Object



13
14
15
# File 'lib/hrr_rb_ssh/connection/request_handler.rb', line 13

def run context
  @proc.call context
end