Class: ActiveSupport::ExecutionContext::Record

Inherits:
Object
  • Object
show all
Defined in:
lib/active_support/execution_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRecord

Returns a new instance of Record.



8
9
10
11
12
# File 'lib/active_support/execution_context.rb', line 8

def initialize
  @store = {}
  @current_attributes_instances = {}
  @stack = []
end

Instance Attribute Details

#current_attributes_instancesObject (readonly)

Returns the value of attribute current_attributes_instances.



6
7
8
# File 'lib/active_support/execution_context.rb', line 6

def current_attributes_instances
  @current_attributes_instances
end

#storeObject (readonly)

Returns the value of attribute store.



6
7
8
# File 'lib/active_support/execution_context.rb', line 6

def store
  @store
end

Instance Method Details

#popObject



21
22
23
24
25
# File 'lib/active_support/execution_context.rb', line 21

def pop
  @current_attributes_instances = @stack.pop
  @store = @stack.pop
  self
end

#pushObject



14
15
16
17
18
19
# File 'lib/active_support/execution_context.rb', line 14

def push
  @stack << @store << @current_attributes_instances
  @store = {}
  @current_attributes_instances = {}
  self
end