Sha256: f997a9a18298c3bc2f9961a718b03ba01b9e5341e76024ae05ce855473bfac66

Contents?: true

Size: 299 Bytes

Versions: 267

Compression:

Stored size: 299 Bytes

Contents

class Bundler::Thor
  class NestedContext
    def initialize
      @depth = 0
    end

    def enter
      push

      yield
    ensure
      pop
    end

    def entered?
      @depth > 0
    end

    private

    def push
      @depth += 1
    end

    def pop
      @depth -= 1
    end
  end
end

Version data entries

267 entries across 267 versions & 6 rubygems

Version Path
harbr-0.1.55 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.54 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.53 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.52 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.50 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.49 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.48 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.47 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.46 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.45 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.44 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.43 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.42 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.41 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.39 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.38 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
harbr-0.1.37 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
direct7-0.0.11 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/bundler-2.3.5/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.3.27 lib/bundler/vendor/thor/lib/thor/nested_context.rb