Sha256: e1d79ace7576ce7f89470a73c481f2a64156e722d0fce82c69a30d12cf5a7580

Contents?: true

Size: 422 Bytes

Versions: 42

Compression:

Stored size: 422 Bytes

Contents

require 'explicit_delegator'

module WoopleTheme
  class QuestionPresenter < ExplicitDelegator
    enforce_definitions :id,       # Response id used in the form
                        :question, # Text of the question
                        :answers   # Set of options/answers for the question

    def answers
      ThemePresentation.wrap_collection(__getobj__.answers, WoopleTheme::AnswerPresenter)
    end

  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
woople-theme-0.3.02 app/presenters/woople_theme/question_presenter.rb
woople-theme-0.3.01 app/presenters/woople_theme/question_presenter.rb