Class: Getto::Params::Search::Query::Checker
- Inherits:
-
Object
- Object
- Getto::Params::Search::Query::Checker
- Defined in:
- lib/getto/params/search.rb
Instance Method Summary collapse
-
#initialize(columns) ⇒ Checker
constructor
A new instance of Checker.
- #not_all_empty ⇒ Object
- #not_empty ⇒ Object
- #search(column, &checker) ⇒ Object
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_empty ⇒ Object
122 123 124 |
# File 'lib/getto/params/search.rb', line 122 def not_all_empty ->(search){ not search.all?(&:empty?) } end |
#not_empty ⇒ Object
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 |