Class: Decidim::ActionDelegator::QuestionWithTotals
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Decidim::ActionDelegator::QuestionWithTotals
- Defined in:
- app/presenters/decidim/action_delegator/question_with_totals.rb
Instance Method Summary collapse
-
#initialize(question, questions_by_id) ⇒ QuestionWithTotals
constructor
A new instance of QuestionWithTotals.
- #total_delegates ⇒ Object
- #total_participants ⇒ Object
Constructor Details
#initialize(question, questions_by_id) ⇒ QuestionWithTotals
Returns a new instance of QuestionWithTotals.
6 7 8 9 |
# File 'app/presenters/decidim/action_delegator/question_with_totals.rb', line 6 def initialize(question, questions_by_id) super(question) @questions_by_id = questions_by_id end |
Instance Method Details
#total_delegates ⇒ Object
11 12 13 |
# File 'app/presenters/decidim/action_delegator/question_with_totals.rb', line 11 def total_delegates questions_by_id[id].total_delegates end |
#total_participants ⇒ Object
15 16 17 |
# File 'app/presenters/decidim/action_delegator/question_with_totals.rb', line 15 def total_participants questions_by_id[id].total_participants end |