Class: ContextExposer::ViewContext
- Inherits:
-
Object
- Object
- ContextExposer::ViewContext
- Defined in:
- lib/context_exposer/view_context.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#page ⇒ Object
Returns the value of attribute page.
Instance Method Summary collapse
-
#initialize(controller = nil, page = nil) ⇒ ViewContext
constructor
A new instance of ViewContext.
Constructor Details
#initialize(controller = nil, page = nil) ⇒ ViewContext
Returns a new instance of ViewContext.
5 6 7 8 |
# File 'lib/context_exposer/view_context.rb', line 5 def initialize controller = nil, page = nil @controller = controller self.page = page if page end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
2 3 4 |
# File 'lib/context_exposer/view_context.rb', line 2 def controller @controller end |
#page ⇒ Object
Returns the value of attribute page.
3 4 5 |
# File 'lib/context_exposer/view_context.rb', line 3 def page @page end |