Sha256: 177811557164c30085bd280defd457791e2c3df82b983fd6c884f90a27b33b00

Contents?: true

Size: 354 Bytes

Versions: 9

Compression:

Stored size: 354 Bytes

Contents

module Finitio
  class FetchScope

    def initialize(parent, overrides)
      @parent, @overrides = parent, overrides
    end

    def fetch(name, &bl)
      @overrides.fetch(name) do
        @parent.fetch(name, &bl)
      end
    end

    def with(overrides)
      FetchScope.new(self, overrides)
    end

  end # class FetchScope
end # module Finitio

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
finitio-0.12.0 lib/finitio/support/fetch_scope.rb
finitio-0.11.4 lib/finitio/support/fetch_scope.rb
finitio-0.11.3 lib/finitio/support/fetch_scope.rb
finitio-0.11.2 lib/finitio/support/fetch_scope.rb
finitio-0.11.1 lib/finitio/support/fetch_scope.rb
finitio-0.10.0 lib/finitio/support/fetch_scope.rb
finitio-0.9.1 lib/finitio/support/fetch_scope.rb
finitio-0.9.0 lib/finitio/support/fetch_scope.rb
finitio-0.8.0 lib/finitio/support/fetch_scope.rb