Class: ContextExposer::ViewContext

Inherits:
Object
  • Object
show all
Defined in:
lib/context_exposer/view_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#controllerObject (readonly)

Returns the value of attribute controller.



2
3
4
# File 'lib/context_exposer/view_context.rb', line 2

def controller
  @controller
end

#pageObject

Returns the value of attribute page.



3
4
5
# File 'lib/context_exposer/view_context.rb', line 3

def page
  @page
end