class Voom::Presenters::DSL::Components::Snackbar
Attributes
text[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/snackbar.rb, line 8 def initialize(**attribs_, &block) super(type: :snackbar, **attribs_, &block) @text = attribs.delete(:text) expand! end
Public Instance Methods
action(text=nil, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/snackbar.rb, line 14 def action(text=nil, &block) return @action if locked? @action = Action.new(parent: self, text: text, &block) end