Class: SqlQueryExecutor::Operators::Default
- Defined in:
- lib/sql_query_executor/operators/default.rb
Instance Method Summary collapse
- #execute!(result) ⇒ Object
-
#initialize(query, collection) ⇒ Default
constructor
A new instance of Default.
Constructor Details
#initialize(query, collection) ⇒ Default
6 7 8 9 |
# File 'lib/sql_query_executor/operators/default.rb', line 6 def initialize(query, collection) super convert_operator end |
Instance Method Details
#execute!(result) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/sql_query_executor/operators/default.rb', line 11 def execute!(result) @collection.select do |record| value = record.send(@field.to_s) value.send(@operator, @value) rescue false end end |