Sha256: ca0c727436d01297d358730d4a34f05c47796b23232549909ae451df32f9f358

Contents?: true

Size: 288 Bytes

Versions: 3

Compression:

Stored size: 288 Bytes

Contents

module Interactor
  class Context
    # Overriding build method to continue with a Schema Context
    # when one is found
    def self.build(context = {})
      return context if context.is_a?(Interactor::Schema::Context)
      self === context ? context : new(context)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
interactor-schema-0.2.2 lib/interactor/schema/context_extension.rb
interactor-schema-0.2.1 lib/interactor/schema/context_extension.rb
interactor-schema-0.2.0 lib/interactor/schema/context_extension.rb