Class: Apps::Outlook::Schema::MultichoiceInput
- Defined in:
- lib/apps/outlook/schema/multichoice_input.rb
Overview
Constant Summary collapse
- STYLES =
%w[normal expanded].freeze
Instance Attribute Summary collapse
-
#multiple ⇒ Object
Boolean - whether to allow selecting multiple choices.
-
#style ⇒ Object
Boolean - whether to allow selecting multiple choices.
Attributes inherited from Input
#id, #required, #title, #value
Instance Method Summary collapse
- #add_choice(name, value) ⇒ Object
-
#choices ⇒ Object
normal- dropdownexpanded- radio button list. - #serialize ⇒ Object
Instance Attribute Details
#multiple ⇒ Object
Boolean - whether to allow selecting multiple choices
10 11 12 |
# File 'lib/apps/outlook/schema/multichoice_input.rb', line 10 def multiple @multiple end |
#style ⇒ Object
Boolean - whether to allow selecting multiple choices
10 11 12 |
# File 'lib/apps/outlook/schema/multichoice_input.rb', line 10 def style @style end |
Instance Method Details
#add_choice(name, value) ⇒ Object
26 27 28 |
# File 'lib/apps/outlook/schema/multichoice_input.rb', line 26 def add_choice(name, value) choices[name] = value end |
#choices ⇒ Object
normal - dropdown expanded - radio button list
14 15 16 |
# File 'lib/apps/outlook/schema/multichoice_input.rb', line 14 def choices @choices ||= {} end |
#serialize ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/apps/outlook/schema/multichoice_input.rb', line 18 def serialize super.merge( "isMultiSelect" => multiple, "style" => style, "choices" => serialize_hash(choices, key: 'display') ) end |