# File lib/net/sftp/operations/abstract.rb, line 48 def execute( *args, &callback ) @log.debug "executing" if @log.debug? unless block_given? status = result = nil callback = Proc.new do |status, *pargs| status = status result = case when pargs.empty? then @session.status when pargs.length == 1 then pargs.first else pargs end end end @callback = callback @id = perform *args @log.debug "received request id #{@id}" @session.register( @id, self ) unless block_given? @session.loop { status.nil? } @session.status = status return result end end