Module: ActiveDecorator::ViewContext
- Defined in:
- lib/active_decorator/view_context.rb
Defined Under Namespace
Modules: Filter
Class Method Summary collapse
Class Method Details
.current ⇒ Object
4 5 6 |
# File 'lib/active_decorator/view_context.rb', line 4 def current Thread.current[:active_decorator_view_contexts].last end |
.pop ⇒ Object
13 14 15 |
# File 'lib/active_decorator/view_context.rb', line 13 def pop Thread.current[:active_decorator_view_contexts].pop if Thread.current[:active_decorator_view_contexts] end |
.push(view_context) ⇒ Object
8 9 10 11 |
# File 'lib/active_decorator/view_context.rb', line 8 def push(view_context) Thread.current[:active_decorator_view_contexts] ||= [] Thread.current[:active_decorator_view_contexts] << view_context end |