Class: T::Private::DeclState

Inherits:
Object
  • Object
show all
Defined in:
lib/types/private/decl_state.rb

Overview

typed: true

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#active_declarationObject

Returns the value of attribute active_declaration.



13
14
15
# File 'lib/types/private/decl_state.rb', line 13

def active_declaration
  @active_declaration
end

#skip_next_on_method_addedObject

Returns the value of attribute skip_next_on_method_added.



14
15
16
# File 'lib/types/private/decl_state.rb', line 14

def skip_next_on_method_added
  @skip_next_on_method_added
end

Class Method Details

.currentObject



5
6
7
# File 'lib/types/private/decl_state.rb', line 5

def self.current
  Thread.current[:opus_types__decl_state] ||= self.new
end

.current=(other) ⇒ Object



9
10
11
# File 'lib/types/private/decl_state.rb', line 9

def self.current=(other)
  Thread.current[:opus_types__decl_state] = other
end

Instance Method Details

#reset!Object



16
17
18
# File 'lib/types/private/decl_state.rb', line 16

def reset!
  self.active_declaration = nil
end