Class: Navi::Renderers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/navi/renderers/base.rb

Direct Known Subclasses

SimpleNavigation::Renderer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/navi/renderers/base.rb', line 6

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



4
5
6
# File 'lib/navi/renderers/base.rb', line 4

def context
  @context
end

#controller=(value) ⇒ Object

Sets the attribute controller

Parameters:

  • value

    the value to set the attribute controller to.



4
5
6
# File 'lib/navi/renderers/base.rb', line 4

def controller=(value)
  @controller = value
end

#template=(value) ⇒ Object

Sets the attribute template

Parameters:

  • value

    the value to set the attribute template to.



4
5
6
# File 'lib/navi/renderers/base.rb', line 4

def template=(value)
  @template = value
end

Instance Method Details

#render(collection) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/navi/renderers/base.rb', line 10

def render(collection)
  raise NotImplementedError
end