Class: Actions::Helpers::Presenter::Delegated
- Defined in:
- app/lib/actions/helpers/presenter.rb
Overview
Use sub-actions for presenting the data of the task
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #humanized_output ⇒ Object
-
#initialize(_action, delegated_actions) ⇒ Delegated
constructor
A new instance of Delegated.
Constructor Details
#initialize(_action, delegated_actions) ⇒ Delegated
Returns a new instance of Delegated.
27 28 29 30 |
# File 'app/lib/actions/helpers/presenter.rb', line 27 def initialize(_action, delegated_actions) (Type! delegated_actions, Array).all? { |a| Type! a, Presenter } @delegated_actions = delegated_actions end |
Instance Method Details
#humanized_output ⇒ Object
32 33 34 |
# File 'app/lib/actions/helpers/presenter.rb', line 32 def humanized_output @delegated_actions.map(&:humanized_output).compact.join("\n") end |