Class: RubyUI::Button
- Defined in:
- lib/ruby_ui/button/button.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(type: :button, variant: :primary, size: :md, icon: false, **attrs) ⇒ Button
constructor
A new instance of Button.
- #view_template ⇒ Object
Constructor Details
#initialize(type: :button, variant: :primary, size: :md, icon: false, **attrs) ⇒ Button
Returns a new instance of Button.
5 6 7 8 9 10 11 |
# File 'lib/ruby_ui/button/button.rb', line 5 def initialize(type: :button, variant: :primary, size: :md, icon: false, **attrs) @type = type @variant = variant.to_sym @size = size.to_sym @icon = icon super(**attrs) end |
Instance Method Details
#view_template ⇒ Object
13 14 15 |
# File 'lib/ruby_ui/button/button.rb', line 13 def view_template(&) (**attrs, &) end |