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.
242 243 244 |
# File 'lib/mxrb/dsl/builder.rb', line 242 def initialize @buttons = [] end |
Instance Method Details
#delete_button(caption: "Delete") ⇒ Object
250 251 252 |
# File 'lib/mxrb/dsl/builder.rb', line 250 def (caption: "Delete") @buttons << { type: :delete, caption: caption } end |
#export_button(caption: "Export") ⇒ Object
258 259 260 |
# File 'lib/mxrb/dsl/builder.rb', line 258 def (caption: "Export") @buttons << { type: :export, caption: caption } end |
#new_button(caption: "New") ⇒ Object
246 247 248 |
# File 'lib/mxrb/dsl/builder.rb', line 246 def (caption: "New") @buttons << { type: :new, caption: caption } end |
#search_button(caption: "Search") ⇒ Object
254 255 256 |
# File 'lib/mxrb/dsl/builder.rb', line 254 def (caption: "Search") @buttons << { type: :search, caption: caption } end |
#to_h ⇒ Object
262 263 264 |
# File 'lib/mxrb/dsl/builder.rb', line 262 def to_h { buttons: @buttons } end |