class Voom::Presenters::DSL::Components::Lists::Action
Attributes
action_type[RW]
Public Class Methods
new(**attribs_, &block)
click to toggle source
Calls superclass method
Voom::Presenters::DSL::Components::Base::new
# File lib/voom/presenters/dsl/components/lists/action.rb, line 9 def initialize(**attribs_, &block) super(type: :action, **attribs_, &block) expand! end
Public Instance Methods
checkbox(**attribs, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/lists/action.rb, line 29 def checkbox(**attribs, &block) return @checkbox if locked? @action_type = :checkbox @checkbox = Checkbox.new(parent: self, **attribs, &block) end
icon(icon = nil, **attribs, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/lists/action.rb, line 14 def icon(icon = nil, **attribs, &block) return @icon if locked? @action_type = :icon @icon = Icon.new(parent: self, icon: icon, **attribs, &block) end
icon_toggle(icon = nil, **attribs, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/lists/action.rb, line 50 def icon_toggle(icon = nil, **attribs, &block) return @icon_toggle if locked? @action_type = :icon_toggle @icon_toggle = IconToggle.new(parent: self, icon: icon, **attribs, &block) end
switch(**attribs, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/lists/action.rb, line 43 def switch(**attribs, &block) return @switch if locked? @action_type = :switch @switch = Switch.new(parent: self, **attribs, &block) end