packet (Net::SFTP::Protocol::PacketAssistant)

    # File lib/net/sftp/protocol/packet-assistant.rb, line 43
        def self.packet( name, *args )
          body = ""
          args.each do |arg|
            body << "b.write"
            case arg
              when :long, :int64, :short, :byte
                body << "_#{arg} args.shift.to_i"
              when :string
                body << "_#{arg} args.shift.to_s"
              when :attrs, :write
                body << " args.shift.to_s"
            end
            body << "\n"
          end
          class_eval "def \#{name}( id, *args )\nb = buffers.writer\nid ||= driver.next_request_id\nb.write_long id\n\#{body}\n[ id, b.to_s ]\nend\n", __FILE__, __LINE__+1
        end