module Shrine::Plugins::Processing::InstanceMethods

  1. lib/shrine/plugins/processing.rb

Methods

Public Instance

  1. process

Public Instance methods

process (io, context = {})
[show source]
# File lib/shrine/plugins/processing.rb, line 65
def process(io, context = {})
  pipeline = opts[:processing][context[:action]] || []

  result = pipeline.inject(io) do |input, processing|
    instance_exec(input, context, &processing) || input
  end

  result unless result == io
end