Class: Georgia::ListFacetPresenter
- Defined in:
- app/presenters/georgia/list_facet_presenter.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
Attributes inherited from Presenter
Instance Method Summary collapse
-
#initialize(view_context, list, param, options = {}) ⇒ ListFacetPresenter
constructor
A new instance of ListFacetPresenter.
- #to_s ⇒ Object
Constructor Details
#initialize(view_context, list, param, options = {}) ⇒ ListFacetPresenter
Returns a new instance of ListFacetPresenter.
6 7 8 9 10 11 |
# File 'app/presenters/georgia/list_facet_presenter.rb', line 6 def initialize view_context, list, param, ={} super @list = list @param = param @options = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Georgia::Presenter
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
4 5 6 |
# File 'app/presenters/georgia/list_facet_presenter.rb', line 4 def list @list end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'app/presenters/georgia/list_facet_presenter.rb', line 4 def @options end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
4 5 6 |
# File 'app/presenters/georgia/list_facet_presenter.rb', line 4 def param @param end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/presenters/georgia/list_facet_presenter.rb', line 13 def to_s output = ActiveSupport::SafeBuffer.new list.each do |text| output << link_to(text, url_for(merged_params(text)), class: 'label label-default') unless active?(text) end output end |