Class: Georgia::ActiveFacetPresenter

Inherits:
Presenter
  • Object
show all
Defined in:
app/presenters/georgia/active_facet_presenter.rb

Direct Known Subclasses

SingleActiveFacetPresenter

Instance Attribute Summary collapse

Attributes inherited from Presenter

#view_context

Instance Method Summary collapse

Constructor Details

#initialize(view_context, text, param, options = {}) ⇒ ActiveFacetPresenter

Returns a new instance of ActiveFacetPresenter.



6
7
8
9
10
11
# File 'app/presenters/georgia/active_facet_presenter.rb', line 6

def initialize view_context, text, param, options={}
  super
  @text = text
  @param = param
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Georgia::Presenter

Instance Attribute Details

#paramObject (readonly)

Returns the value of attribute param.



4
5
6
# File 'app/presenters/georgia/active_facet_presenter.rb', line 4

def param
  @param
end

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'app/presenters/georgia/active_facet_presenter.rb', line 4

def text
  @text
end

Instance Method Details

#to_sObject



13
14
15
16
17
# File 'app/presenters/georgia/active_facet_presenter.rb', line 13

def to_s
  link_to url_for(unmerged_params), class: 'label label-primary' do
    "#{text} #{icon_tag('times')}".html_safe
  end
end