Class: PhlexUI::Clipboard
- Defined in:
- lib/phlex_ui/clipboard.rb
Defined Under Namespace
Classes: Popover, Source, Trigger
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(success: "Copied!", error: "Copy Failed!", **attrs) ⇒ Clipboard
constructor
A new instance of Clipboard.
- #view_template(&block) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(success: "Copied!", error: "Copy Failed!", **attrs) ⇒ Clipboard
Returns a new instance of Clipboard.
5 6 7 8 9 |
# File 'lib/phlex_ui/clipboard.rb', line 5 def initialize(success: "Copied!", error: "Copy Failed!", **attrs) @success = success @error = error super(**attrs) end |
Instance Method Details
#view_template(&block) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/phlex_ui/clipboard.rb', line 11 def view_template(&block) div(**attrs) do div(&block) success_popover error_popover end end |