Module: AppRail::Steps::CoreForms::Question

Included in:
Displayable
Defined in:
lib/app_rail/steps/core_forms/question.rb

Instance Method Summary collapse

Instance Method Details

#ar_core_forms_question_multiple_selection(label:, multiple_selection_options:, selection_type: :single, optional: false, show_other_option: false) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/app_rail/steps/core_forms/question.rb', line 7

def ar_core_forms_question_multiple_selection(label:, multiple_selection_options:, selection_type: :single, optional: false, show_other_option: false)
  raise "Missing label" if label.nil?
  raise "Missing multiple_selection_options" if multiple_selection_options.nil?

  {
    item_type: :multiple_selection,
    label: label,
    multiple_selection_options: multiple_selection_options,
    selection_type: selection_type,
    optional: optional,
    show_other_option: show_other_option
  }
end