class Voom::Presenters::DSL::Components::MultiSelect::CheckOption
Attributes
disabled[R]
selected[R]
Public Class Methods
new(**attribs_, &block)
click to toggle source
Calls superclass method
Voom::Presenters::DSL::Components::EventBase::new
# File lib/voom/presenters/dsl/components/multi_select.rb, line 27 def initialize(**attribs_, &block) super(type: :multi_select_option, **attribs_, &block) @value = attribs.delete(:value) @text = attribs.delete(:text) @selected = attribs.delete(:selected){ true } @disabled = attribs.delete(:disabled) self.checkbox(name: "#{attribs[:name]}[]", value: @value, text: @text, tag: tag, checked: @selected, disabled: @disabled, &block) expand! end
Public Instance Methods
checkbox(**attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/multi_select.rb, line 43 def checkbox(**attributes, &block) return @checkbox if locked? @checkbox = Components::Checkbox.new(parent: self, **attributes, &block) end