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.



63
64
65
66
67
68
69
# File 'lib/shrine/plugins/rack_file.rb', line 63

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