Class: Voom::Presenters::DSL::Components::Dialog::Actions
- Defined in:
- lib/voom/presenters/dsl/components/dialog.rb
Instance Attribute Summary collapse
-
#buttons ⇒ Object
Returns the value of attribute buttons.
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
- #button(text = nil, **options, &block) ⇒ Object
-
#initialize(**attribs_, &block) ⇒ Actions
constructor
A new instance of Actions.
Methods inherited from Base
Methods included from Pluggable
#include_plugins, #plugin, #plugin_module
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ Actions
Returns a new instance of Actions.
64 65 66 67 68 |
# File 'lib/voom/presenters/dsl/components/dialog.rb', line 64 def initialize(**attribs_, &block) super(type: :action, **attribs_, &block) @buttons = [] end |
Instance Attribute Details
#buttons ⇒ Object
Returns the value of attribute buttons.
62 63 64 |
# File 'lib/voom/presenters/dsl/components/dialog.rb', line 62 def @buttons end |
Instance Method Details
#button(text = nil, **options, &block) ⇒ Object
70 71 72 73 |
# File 'lib/voom/presenters/dsl/components/dialog.rb', line 70 def (text = nil, **, &block) @buttons << Components::Button.new(parent: self, text: text, **, &block) end |