Module: Shrine::Plugins::RackFile::AttacherMethods

Defined in:
lib/shrine/plugins/rack_file.rb

Instance Method Summary collapse

Instance Method Details

#assign(value, **options) ⇒ Object

Checks whether a file is a Rack file hash, and in that case wraps the hash in an IO-like object.


27
28
29
30
31
32
33
# File 'lib/shrine/plugins/rack_file.rb', line 27

def assign(value, **options)
  if rack_file?(value)
    assign shrine_class.rack_file(value), **options
  else
    super
  end
end