Sha256: 1fc9c59f31d06ca762428bd2f4089c8c9044df3990e3827620e2de5b1d83f503

Contents?: true

Size: 373 Bytes

Versions: 4

Compression:

Stored size: 373 Bytes

Contents

class Trailblazer::Operation
  module Params
    def self.included(includer)
      includer.> Replace, after: New
    end
  end

  # Returned object will replace "params". Original is saved in "params.original".
  Params::Replace = ->(input, options) {
    options["params.original"] = original = options["params"]
     options["params"] = input.params!(original)
   }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trailblazer-2.0.0.rc1 lib/trailblazer/operation/params.rb
trailblazer-2.0.0.beta3 lib/trailblazer/operation/params.rb
trailblazer-2.0.0.beta2 lib/trailblazer/operation/params.rb
trailblazer-2.0.0.beta1 lib/trailblazer/operation/params.rb