Class: Trestle::Toolbar::Builder
- Inherits:
-
Object
- Object
- Trestle::Toolbar::Builder
- Defined in:
- lib/trestle/toolbar/builder.rb
Direct Known Subclasses
Resource::Toolbar::Builder, Trestle::Table::ActionsColumn::ActionsBuilder
Class Method Summary collapse
Instance Method Summary collapse
- #button(label, **options, &block) ⇒ Object
- #dropdown(label = nil, **options, &block) ⇒ Object
-
#initialize(template) ⇒ Builder
constructor
A new instance of Builder.
- #link(label, instance_or_url = nil, **options, &block) ⇒ Object
Constructor Details
#initialize(template) ⇒ Builder
Returns a new instance of Builder.
4 5 6 |
# File 'lib/trestle/toolbar/builder.rb', line 4 def initialize(template) @template = template end |
Class Method Details
.builder_method(*methods) ⇒ Object
26 27 28 |
# File 'lib/trestle/toolbar/builder.rb', line 26 def self.builder_method(*methods) self.builder_methods += methods end |
Instance Method Details
#button(label, **options, &block) ⇒ Object
8 9 10 |
# File 'lib/trestle/toolbar/builder.rb', line 8 def (label, **, &block) Button.new(@template, label, **, &block) end |