Spec-Zone.ru › Ruby 2.7

класс Bundler::Thor::NestedContext

Родитель:
Объект

Публичные Классовые Методы

new() Показать исходный код
# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 3
def initialize
  @depth = 0
end

Публичные Методы Экземпляров

enter() { || ... } Показать исходный код
# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 7
def enter
  push

  yield
ensure
  pop
end
entered?() Показать исходный код
# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 15
def entered?
  @depth > 0
end

Приватные Методы Экземпляров

pop() Показать исходный код
# File lib/bundler/vendor/thor/lib/thor/nested_context.rb, line 25
def pop
  @depth -= 1
end
push() Показать исходный код
# 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.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API