Class: RubyUI::Alert
- Defined in:
- lib/ruby_ui/alert/alert.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(variant: nil, **attrs) ⇒ Alert
constructor
A new instance of Alert.
- #view_template ⇒ Object
Constructor Details
#initialize(variant: nil, **attrs) ⇒ Alert
Returns a new instance of Alert.
5 6 7 8 |
# File 'lib/ruby_ui/alert/alert.rb', line 5 def initialize(variant: nil, **attrs) @variant = variant super(**attrs) # must be called after variant is set end |
Instance Method Details
#view_template ⇒ Object
10 11 12 |
# File 'lib/ruby_ui/alert/alert.rb', line 10 def view_template(&) div(**attrs, &) end |