Class: Bullet::Registry::CallStack
- Defined in:
- lib/bullet/registry/call_stack.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#add(key, backtrace = nil) ⇒ Object
remembers found association backtrace if backtrace is provided, it will be used and override any existing value.
Methods inherited from Base
#[], #delete, #each, #include?, #initialize, #key?, #select
Constructor Details
This class inherits a constructor from Bullet::Registry::Base
Instance Method Details
#add(key, backtrace = nil) ⇒ Object
remembers found association backtrace if backtrace is provided, it will be used and override any existing value
8 9 10 11 12 13 14 |
# File 'lib/bullet/registry/call_stack.rb', line 8 def add(key, backtrace = nil) if backtrace @registry[key] = backtrace else @registry[key] ||= Thread.current.backtrace end end |