Class: Voom::Presenters::DSL::Components::Snackbar::Action

Inherits:
EventBase
  • Object
show all
Defined in:
lib/voom/presenters/dsl/components/snackbar.rb

Instance Attribute Summary collapse

Attributes inherited from EventBase

#event_parent_id

Attributes included from Mixins::Event

#events

Attributes inherited from Base

#attributes, #context, #id, #type

Instance Method Summary collapse

Methods included from Mixins::Event

#event

Methods inherited from Base

#expand!

Methods included from Mixins::YieldTo

#yield_to

Methods included from Serializer

#to_hash

Methods included from Lockable

#lock!, #locked?

Constructor Details

#initialize(**attribs_, &block) ⇒ Action

Returns a new instance of Action.



22
23
24
25
26
# File 'lib/voom/presenters/dsl/components/snackbar.rb', line 22

def initialize(**attribs_, &block)
  super(type: :snackbar, **attribs_, &block)
  @text = attribs.delete(:text)
  expand!
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



20
21
22
# File 'lib/voom/presenters/dsl/components/snackbar.rb', line 20

def text
  @text
end