Module: Shrine::Plugins::Versions::InstanceMethods

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

Instance Method Summary collapse

Instance Method Details

#upload(io, **options) ⇒ Object


44
45
46
47
48
49
50
51
52
# File 'lib/shrine/plugins/versions.rb', line 44

def upload(io, **options)
  files = process(io, **options) || io

  Utils.map_file(files) do |name, version|
    options.merge!(version: name.one? ? name.first : name) if name

    super(version, **options, process: false)
  end
end