Class: Mxrb::Dsl::ToolbarBuilder
- Inherits:
-
Object
- Object
- Mxrb::Dsl::ToolbarBuilder
- Defined in:
- lib/mxrb/dsl/builder.rb
Instance Method Summary collapse
- #delete_button(caption: "Delete") ⇒ Object
- #export_button(caption: "Export") ⇒ Object
-
#initialize ⇒ ToolbarBuilder
constructor
A new instance of ToolbarBuilder.
- #new_button(caption: "New") ⇒ Object
- #search_button(caption: "Search") ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ ToolbarBuilder
Returns a new instance of ToolbarBuilder.
199 200 201 |
# File 'lib/mxrb/dsl/builder.rb', line 199 def initialize @buttons = [] end |
Instance Method Details
#delete_button(caption: "Delete") ⇒ Object
207 208 209 |
# File 'lib/mxrb/dsl/builder.rb', line 207 def (caption: "Delete") @buttons << { type: :delete, caption: caption } end |
#export_button(caption: "Export") ⇒ Object
215 216 217 |
# File 'lib/mxrb/dsl/builder.rb', line 215 def (caption: "Export") @buttons << { type: :export, caption: caption } end |
#new_button(caption: "New") ⇒ Object
203 204 205 |
# File 'lib/mxrb/dsl/builder.rb', line 203 def (caption: "New") @buttons << { type: :new, caption: caption } end |
#search_button(caption: "Search") ⇒ Object
211 212 213 |
# File 'lib/mxrb/dsl/builder.rb', line 211 def (caption: "Search") @buttons << { type: :search, caption: caption } end |
#to_h ⇒ Object
219 220 221 |
# File 'lib/mxrb/dsl/builder.rb', line 219 def to_h { buttons: @buttons } end |