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.
265 266 267 |
# File 'lib/mxrb/dsl/builder.rb', line 265 def initialize @buttons = [] end |
Instance Method Details
#delete_button(caption: "Delete") ⇒ Object
273 274 275 |
# File 'lib/mxrb/dsl/builder.rb', line 273 def (caption: "Delete") @buttons << { type: :delete, caption: caption } end |
#export_button(caption: "Export") ⇒ Object
281 282 283 |
# File 'lib/mxrb/dsl/builder.rb', line 281 def (caption: "Export") @buttons << { type: :export, caption: caption } end |
#new_button(caption: "New") ⇒ Object
269 270 271 |
# File 'lib/mxrb/dsl/builder.rb', line 269 def (caption: "New") @buttons << { type: :new, caption: caption } end |
#search_button(caption: "Search") ⇒ Object
277 278 279 |
# File 'lib/mxrb/dsl/builder.rb', line 277 def (caption: "Search") @buttons << { type: :search, caption: caption } end |
#to_h ⇒ Object
285 286 287 |
# File 'lib/mxrb/dsl/builder.rb', line 285 def to_h { buttons: @buttons } end |