Sha256: 6bbc7c58ebf37f8f62fc090c12710a61741fc3149f8b97332113c04162a69e54

Contents?: true

Size: 303 Bytes

Versions: 57

Compression:

Stored size: 303 Bytes

Contents

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

    def enter
      push

      yield
    ensure
      pop
    end

    def entered?
      @depth.positive?
    end

  private

    def push
      @depth += 1
    end

    def pop
      @depth -= 1
    end
  end
end

Version data entries

57 entries across 57 versions & 3 rubygems

Version Path
rubygems-update-3.6.3 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.6.3 lib/bundler/vendor/thor/lib/thor/nested_context.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/bundler-2.5.5/lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.6.2 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.6.2 lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.6.1 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.6.1 lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.6.0 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.6.0 lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.5.23 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.5.23 lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.5.22 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.5.22 lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.5.21 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.5.21 lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.5.20 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.5.20 lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.5.19 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb
bundler-2.5.19 lib/bundler/vendor/thor/lib/thor/nested_context.rb
rubygems-update-3.5.18 bundler/lib/bundler/vendor/thor/lib/thor/nested_context.rb