# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 3 def initialize @depth = 0 end
# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 7 def enter push yield ensure pop end
# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 15 def entered? @depth > 0 end
# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 25 def pop @depth -= 1 end
# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 21 def push @depth += 1 end
Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.