Class: FacetPresenter

Inherits:
Object
  • Object
show all
Includes:
ActionView::Context, ActionView::Helpers::TagHelper, ActionView::Helpers::UrlHelper
Defined in:
lib/facetie/presenters/facet_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view, facet, filter, options = {}) ⇒ FacetPresenter

Returns a new instance of FacetPresenter.



9
10
11
12
13
14
15
# File 'lib/facetie/presenters/facet_presenter.rb', line 9

def initialize view, facet, filter, options={}
  @view = view
  @facet = facet
  @filter = filter
  @params = view.params.symbolize_keys.reject{|k,v| [:controller, :action].include?(k)}
  @options = options
end

Instance Attribute Details

#facetObject

Returns the value of attribute facet.



7
8
9
# File 'lib/facetie/presenters/facet_presenter.rb', line 7

def facet
  @facet
end

#filterObject

Returns the value of attribute filter.



7
8
9
# File 'lib/facetie/presenters/facet_presenter.rb', line 7

def filter
  @filter
end

#optionsObject

Returns the value of attribute options.



7
8
9
# File 'lib/facetie/presenters/facet_presenter.rb', line 7

def options
  @options
end

#paramsObject

Returns the value of attribute params.



7
8
9
# File 'lib/facetie/presenters/facet_presenter.rb', line 7

def params
  @params
end

#viewObject

Returns the value of attribute view.



7
8
9
# File 'lib/facetie/presenters/facet_presenter.rb', line 7

def view
  @view
end

Instance Method Details

#renderObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/facetie/presenters/facet_presenter.rb', line 17

def render
  raise NotImplementedError
end