Class: Viewable::SelectPresenter
- Inherits:
-
ViewablePresenter
- Object
- BasePresenter
- ViewablePresenter
- Viewable::SelectPresenter
- Defined in:
- app/presenters/viewable/select_presenter.rb
Instance Attribute Summary
Attributes inherited from BasePresenter
Instance Method Summary collapse
Methods inherited from ViewablePresenter
Methods inherited from BasePresenter
#initialize, #method_missing, #respond_to?
Constructor Details
This class inherits a constructor from BasePresenter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BasePresenter
Instance Method Details
#label ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/presenters/viewable/select_presenter.rb', line 7 def label if m.label.blank? m.value else m.label end end |
#option ⇒ Object
3 4 5 |
# File 'app/presenters/viewable/select_presenter.rb', line 3 def option [label, m.value] end |