Class: Bundler::Thor::NestedContext
| Relationships & Source Files | |
| Inherits: | Object | 
| Defined in: | lib/bundler/vendor/thor/lib/thor/nested_context.rb | 
Class Method Summary
- .new ⇒ NestedContext constructor
Instance Attribute Summary
- #entered? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
    .new  ⇒ NestedContext 
  
# File 'lib/bundler/vendor/thor/lib/thor/nested_context.rb', line 3
def initialize @depth = 0 end
Instance Attribute Details
    #entered?  ⇒ Boolean  (readonly)
  
  [ GitHub ]
# File 'lib/bundler/vendor/thor/lib/thor/nested_context.rb', line 15
def entered? @depth.positive? end
Instance Method Details
#enter
[ GitHub ]#pop (private)
[ GitHub ]# File 'lib/bundler/vendor/thor/lib/thor/nested_context.rb', line 25
def pop @depth -= 1 end
#push (private)
[ GitHub ]# File 'lib/bundler/vendor/thor/lib/thor/nested_context.rb', line 21
def push @depth += 1 end