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.



185
186
187
# File 'lib/mxrb/dsl/builder.rb', line 185

def initialize
  @fields = []
end

Instance Method Details

#search_field(attribute, caption: nil) ⇒ Object



189
190
191
# File 'lib/mxrb/dsl/builder.rb', line 189

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

#to_hObject



193
194
195
# File 'lib/mxrb/dsl/builder.rb', line 193

def to_h
  { fields: @fields }
end