class Bundler::Thor::NestedContext
公共类方法
new() 点击切换源代码
# File bundler/vendor/thor/lib/thor/nested_context.rb, line 3 def initialize @depth = 0 end
公共实例方法
enter() { || ... } 点击切换源代码
# File bundler/vendor/thor/lib/thor/nested_context.rb, line 7 def enter push yield ensure pop end
entered?() 点击切换源代码
# File bundler/vendor/thor/lib/thor/nested_context.rb, line 15 def entered? @depth.positive? end
私有实例方法
pop() 点击切换源代码
# File bundler/vendor/thor/lib/thor/nested_context.rb, line 25 def pop @depth -= 1 end
push() 点击切换源代码
# File bundler/vendor/thor/lib/thor/nested_context.rb, line 21 def push @depth += 1 end