Module: Doodle::ClassMethods
- Included in:
- Doodle
- Defined in:
- lib/doodle/core.rb
Instance Method Summary collapse
-
#context ⇒ Object
provide somewhere to hold thread-specific context information (I’m claiming the :doodle_xxx namespace).
- #parent ⇒ Object
Instance Method Details
#context ⇒ Object
provide somewhere to hold thread-specific context information (I’m claiming the :doodle_xxx namespace)
5 6 7 |
# File 'lib/doodle/core.rb', line 5 def context Thread.current[:doodle_context] ||= [] end |
#parent ⇒ Object
8 9 10 |
# File 'lib/doodle/core.rb', line 8 def parent context[-1] end |