Class: Getto::Params::Search::Query::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/getto/params/search.rb

Instance Method Summary collapse

Constructor Details

#initialize(columns) ⇒ Checker

Returns a new instance of Checker.



109
110
111
# File 'lib/getto/params/search.rb', line 109

def initialize(columns)
  @columns = columns
end

Instance Method Details

#not_all_emptyObject



122
123
124
# File 'lib/getto/params/search.rb', line 122

def not_all_empty
  ->(search){ not search.all?(&:empty?) }
end

#not_emptyObject



118
119
120
# File 'lib/getto/params/search.rb', line 118

def not_empty
  ->(search){ not search.empty? }
end

#search(column, &checker) ⇒ Object



113
114
115
# File 'lib/getto/params/search.rb', line 113

def search(column,&checker)
  @columns[column.to_s] = checker
end