Sha256: 657a585b5d3383941708e548371097ae49a9fb810321fc6631db1ae7b9c94e13

Contents?: true

Size: 373 Bytes

Versions: 16

Compression:

Stored size: 373 Bytes

Contents

module Metaractor
  module RunWithContext
    # Grab context at run and set things up.
    def run(context = {})
      _build_context context
      super()
    end

    def run!(context = {})
      _build_context context
      super()
    end

    def _build_context(context = {})
      @context = Interactor::Context.build(context) unless context.empty?
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
metaractor-3.3.4 lib/metaractor/run_with_context.rb
metaractor-3.3.3 lib/metaractor/run_with_context.rb
metaractor-3.3.2 lib/metaractor/run_with_context.rb
metaractor-3.3.0 lib/metaractor/run_with_context.rb
metaractor-3.2.0 lib/metaractor/run_with_context.rb
metaractor-3.1.1 lib/metaractor/run_with_context.rb
metaractor-3.1.0 lib/metaractor/run_with_context.rb
metaractor-3.0.1 lib/metaractor/run_with_context.rb
metaractor-3.0.0 lib/metaractor/run_with_context.rb
metaractor-2.1.1 lib/metaractor/run_with_context.rb
metaractor-2.1.0 lib/metaractor/run_with_context.rb
metaractor-2.0.0 lib/metaractor/run_with_context.rb
metaractor-1.2.1 lib/metaractor/run_with_context.rb
metaractor-1.2.0 lib/metaractor/run_with_context.rb
metaractor-1.1.0 lib/metaractor/run_with_context.rb
metaractor-0.5.0 lib/metaractor/run_with_context.rb