Class: PhlexUI::Alert

Inherits:
Base
  • Object
show all
Defined in:
lib/phlex_ui/alert.rb

Defined Under Namespace

Classes: Description, Title

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template

Constructor Details

#initialize(variant: nil, **attrs) ⇒ Alert

Returns a new instance of Alert.



5
6
7
8
# File 'lib/phlex_ui/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_templateObject



10
11
12
# File 'lib/phlex_ui/alert.rb', line 10

def view_template(&)
  div(**attrs, &)
end