File: uploaded_file.rb

package info (click to toggle)
ruby-apollo-upload-server 2.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 160 kB
  • sloc: ruby: 440; makefile: 6; sh: 4
file content (18 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'delegate'
require 'action_dispatch/http/upload'

module ApolloUploadServer
  module Wrappers
    class UploadedFile < DelegateClass(::ActionDispatch::Http::UploadedFile)
      def initialize(wrapped_foo)
        super
      end

      def as_json(options = nil)
        instance_values.except('tempfile').as_json(options)
      end
    end
  end
end