Module: CurrentObject::InstanceMethods
- Defined in:
- lib/current_object.rb
Instance Method Summary collapse
-
#current! ⇒ Object
current! - Stores the class instance as the “current” instance for that class.
Instance Method Details
#current! ⇒ Object
current! - Stores the class instance as the “current” instance for that class.
@foo.current!
15 16 17 |
# File 'lib/current_object.rb', line 15 def current! Thread.current[self.class.name] = self end |