Class: RubyUI::ToastAction
- Defined in:
- lib/ruby_ui/toast/toast_action.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(label:, on: nil, **attrs) ⇒ ToastAction
constructor
A new instance of ToastAction.
- #view_template ⇒ Object
Constructor Details
#initialize(label:, on: nil, **attrs) ⇒ ToastAction
Returns a new instance of ToastAction.
5 6 7 8 9 |
# File 'lib/ruby_ui/toast/toast_action.rb', line 5 def initialize(label:, on: nil, **attrs) @label = label @on = on super(**attrs) end |
Instance Method Details
#view_template ⇒ Object
11 12 13 |
# File 'lib/ruby_ui/toast/toast_action.rb', line 11 def view_template (**attrs) { @label } end |