Sha256: 9560f996fb3ea3e47d324fe31b7d4627be1d29549b52abf76e3cd706d5806d54

Contents?: true

Size: 263 Bytes

Versions: 4

Compression:

Stored size: 263 Bytes

Contents

module Tako
  class ProxyStack
    class << self
      def top
        @current
      end

      def in_piles(proxy)
        proxy.base ||= @current
        @current = proxy

        yield
      ensure
        @current = @current.base
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tako-0.2.2 lib/tako/proxy_stack.rb
tako-0.2.1 lib/tako/proxy_stack.rb
tako-0.2.0 lib/tako/proxy_stack.rb
tako-0.1.0 lib/tako/proxy_stack.rb