instance method process

Ruby on Rails 6.0.6

Since v6.0.6 Last seen in v6.0.6 Private — implementation detail, not part of the public API

Signature

process(file, format:)

No documentation comment.

Parameters

file req
format keyreq
Source
# File activestorage/lib/active_storage/transformers/mini_magick_transformer.rb, line 9
        def process(file, format:)
          image = MiniMagick::Image.new(file.path, file)

          transformations.each do |name, argument_or_subtransformations|
            image.mogrify do |command|
              if name.to_s == "combine_options"
                argument_or_subtransformations.each do |subtransformation_name, subtransformation_argument|
                  pass_transform_argument(command, subtransformation_name, subtransformation_argument)
                end
              else
                pass_transform_argument(command, name, argument_or_subtransformations)
              end
            end
          end

          image.format(format) if format

          image.tempfile.tap(&:open)
        end

Defined in activestorage/lib/active_storage/transformers/mini_magick_transformer.rb line 9 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveStorage::Transformers::MiniMagickTransformer

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close