Class: Mxrb::Dsl::SearchBarBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/mxrb/dsl/builder.rb

Instance Method Summary collapse

Constructor Details

#initializeSearchBarBuilder

Returns a new instance of SearchBarBuilder.



228
229
230
# File 'lib/mxrb/dsl/builder.rb', line 228

def initialize
  @fields = []
end

Instance Method Details

#search_field(attribute, caption: nil) ⇒ Object



232
233
234
# File 'lib/mxrb/dsl/builder.rb', line 232

def search_field(attribute, caption: nil)
  @fields << { attribute: attribute.to_s, caption: caption }
end

#to_hObject



236
237
238
# File 'lib/mxrb/dsl/builder.rb', line 236

def to_h
  { fields: @fields }
end