class Voom::Presenters::DSL::Components::MultiSelect
Public Class Methods
new(**attribs_, &block)
click to toggle source
Calls superclass method
# File lib/voom/presenters/dsl/components/multi_select.rb, line 7 def initialize(**attribs_, &block) super(type: :multi_select, **attribs_, &block) @required = attribs.delete(:required) @full_width = attribs.delete(:full_width){ true } @outlined = attribs.delete(:outlined){ true } @options = [] expand! end
Public Instance Methods
check_option(**attribs, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/multi_select.rb, line 16 def check_option(**attribs, &block) @options << CheckOption.new(parent: self, name: @name, tag: @tag, **attribs.delete_if{ |k,v| [:tag, :name].include?(k) }, &block) end