Sha256: 98e8ef9c66875d72eba321efc44c85c273640f68916a1ee194559fadf49c930b

Contents?: true

Size: 459 Bytes

Versions: 20

Compression:

Stored size: 459 Bytes

Contents

module Grape
  module ServeFile
    # A simple class used to identify responses which represent files and do not
    # need to be formatted or pre-read by Rack::Response
    class FileResponse
      attr_reader :file

      # @param file [Object]
      def initialize(file)
        @file = file
      end

      # Equality provided mostly for tests.
      #
      # @return [Boolean]
      def ==(other)
        file == other.file
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/grape-1.2.5/lib/grape/serve_file/file_response.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/grape-1.2.5/lib/grape/serve_file/file_response.rb
grape-1.2.5 lib/grape/serve_file/file_response.rb
grape-1.2.4 lib/grape/serve_file/file_response.rb
grape-1.2.3 lib/grape/serve_file/file_response.rb
grape-1.2.2 lib/grape/serve_file/file_response.rb
grape-1.2.1 lib/grape/serve_file/file_response.rb
grape-1.2.0 lib/grape/serve_file/file_response.rb
grape-1.1.0 lib/grape/serve_file/file_response.rb
grape-1.0.3 lib/grape/serve_file/file_response.rb
grape-1.0.2 lib/grape/serve_file/file_response.rb
grape-1.0.1 lib/grape/serve_file/file_response.rb
grape-1.0.0 lib/grape/serve_file/file_response.rb
grape-0.19.2 lib/grape/serve_file/file_response.rb
grape-0.19.1 lib/grape/serve_file/file_response.rb
grape-0.19.0 lib/grape/serve_file/file_response.rb
grape-0.18.0 lib/grape/serve_file/file_response.rb
grape-0.17.0 lib/grape/serve_file/file_response.rb
grape-0.16.2 lib/grape/serve_file/file_response.rb
grape-0.16.1 lib/grape/serve_file/file_response.rb