Class: Flexi::Json::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/flexi/json/configuration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



20
21
22
23
# File 'lib/flexi/json/configuration.rb', line 20

def initialize
  @exact_match_search = false
  @match_all_fields = false
end

Instance Attribute Details

#exact_match_searchObject

Returns the value of attribute exact_match_search.



9
10
11
# File 'lib/flexi/json/configuration.rb', line 9

def exact_match_search
  @exact_match_search
end

#match_all_fieldsObject

Returns the value of attribute match_all_fields.



9
10
11
# File 'lib/flexi/json/configuration.rb', line 9

def match_all_fields
  @match_all_fields
end

Class Method Details

.default_match_optionsObject



12
13
14
15
16
17
# File 'lib/flexi/json/configuration.rb', line 12

def default_match_options
  {
    match_all: @match_all_fields || false,
    exact_match: @exact_match_search || false
  }.freeze
end