Class: WoopleTheme::SubmittedAnswerPresenter

Inherits:
AnswerPresenter show all
Includes:
ActionView::Helpers::TagHelper
Defined in:
app/presenters/woople_theme/submitted_answer_presenter.rb

Instance Method Summary collapse

Methods inherited from ExplicitDelegator

enforce_definitions, #enforced_methods, #ensure_defined, #initialize

Constructor Details

This class inherits a constructor from ExplicitDelegator

Instance Method Details

#correct_badgeObject



11
12
13
# File 'app/presenters/woople_theme/submitted_answer_presenter.rb', line 11

def correct_badge
  (:span, I18n.t('woople_theme.assessment.correct'), class: "badge badge-success") if correct?
end

#incorrect_badgeObject



15
16
17
# File 'app/presenters/woople_theme/submitted_answer_presenter.rb', line 15

def incorrect_badge
  (:span, I18n.t('woople_theme.assessment.incorrect'), class: "badge badge-important") if incorrect?
end

#radio_checkedObject



23
24
25
# File 'app/presenters/woople_theme/submitted_answer_presenter.rb', line 23

def radio_checked
  'checked="checked"' if checked?
end

#radio_disabledObject



19
20
21
# File 'app/presenters/woople_theme/submitted_answer_presenter.rb', line 19

def radio_disabled
  'disabled="disabled"'
end