Class: Brainshell::Commands::Base

Inherits:
Thor
  • Object
show all
Includes:
ValueFormatter
Defined in:
lib/brainshell/commands/base.rb

Constant Summary

Constants included from ValueFormatter

ValueFormatter::KNOWN_FORMAT_METHODS

Class Method Summary collapse

Methods included from ValueFormatter

#format_value

Class Method Details

.define_query_optionsObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/brainshell/commands/base.rb', line 11

def define_query_options
  multiple_search_fields.each do |field|
    method_option field, type: :array
  end
  text_search_fields.each do |field|
    method_option field
  end
  range_search_fields.each do |field|
    method_option field
  end
end

.multiple_search_fieldsObject



24
# File 'lib/brainshell/commands/base.rb', line 24

def multiple_search_fields; [] end

.range_search_fieldsObject



25
# File 'lib/brainshell/commands/base.rb', line 25

def range_search_fields; [] end

.text_search_fieldsObject



23
# File 'lib/brainshell/commands/base.rb', line 23

def text_search_fields; [] end