class T::Private::DeclState
typed: true
Attributes
active_declaration[RW]
skip_on_method_added[RW]
Public Class Methods
current()
click to toggle source
# File lib/types/private/decl_state.rb, line 5 def self.current Thread.current[:opus_types__decl_state] ||= self.new end
current=(other)
click to toggle source
# File lib/types/private/decl_state.rb, line 9 def self.current=(other) Thread.current[:opus_types__decl_state] = other end
Public Instance Methods
reset!()
click to toggle source
# File lib/types/private/decl_state.rb, line 16 def reset! self.active_declaration = nil end
without_on_method_added() { || ... }
click to toggle source
# File lib/types/private/decl_state.rb, line 20 def without_on_method_added begin # explicit 'self' is needed here old_value = self.skip_on_method_added self.skip_on_method_added = true yield ensure self.skip_on_method_added = old_value end end