Class: Mxrb::Dsl::SearchBarBuilder
- Inherits:
-
Object
- Object
- Mxrb::Dsl::SearchBarBuilder
- Defined in:
- lib/mxrb/dsl/builder.rb
Instance Method Summary collapse
-
#initialize ⇒ SearchBarBuilder
constructor
A new instance of SearchBarBuilder.
- #search_field(attribute, caption: nil) ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ SearchBarBuilder
Returns a new instance of SearchBarBuilder.
251 252 253 |
# File 'lib/mxrb/dsl/builder.rb', line 251 def initialize @fields = [] end |
Instance Method Details
#search_field(attribute, caption: nil) ⇒ Object
255 256 257 |
# File 'lib/mxrb/dsl/builder.rb', line 255 def search_field(attribute, caption: nil) @fields << { attribute: attribute.to_s, caption: caption } end |
#to_h ⇒ Object
259 260 261 |
# File 'lib/mxrb/dsl/builder.rb', line 259 def to_h { fields: @fields } end |