Module: CurrentObject::ClassMethods
- Defined in:
- lib/current_object.rb
Instance Method Summary collapse
-
#current ⇒ Object
current - Returns the instance of the class that is stored as the “current” instance.
Instance Method Details
#current ⇒ Object
current - Returns the instance of the class that is stored as the “current” instance.
@foo.current!
Foo.current # => @foo
26 27 28 |
# File 'lib/current_object.rb', line 26 def current Thread.current[self.name] end |