Class: HrrRbSsh::Connection::RequestHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/hrr_rb_ssh/connection/request_handler.rb,
lib/hrr_rb_ssh/connection/request_handler/reference_env_request_handler.rb,
lib/hrr_rb_ssh/connection/request_handler/reference_exec_request_handler.rb,
lib/hrr_rb_ssh/connection/request_handler/reference_shell_request_handler.rb,
lib/hrr_rb_ssh/connection/request_handler/reference_pty_req_request_handler.rb,
lib/hrr_rb_ssh/connection/request_handler/reference_window_change_request_handler.rb

Defined Under Namespace

Classes: ReferenceEnvRequestHandler, ReferenceExecRequestHandler, ReferencePtyReqRequestHandler, ReferenceShellRequestHandler, ReferenceWindowChangeRequestHandler

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ RequestHandler

Returns a new instance of RequestHandler.



7
8
9
# File 'lib/hrr_rb_ssh/connection/request_handler.rb', line 7

def initialize &block
  @proc = block
end

Instance Method Details

#run(context) ⇒ Object



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

def run context
  @proc.call context
end