Sha256: a6f1c2374b12146725680d060db7e1d02d68fce9250e707565a49d70c03bdb99
Contents?: true
Size: 378 Bytes
Versions: 33
Compression:
Stored size: 378 Bytes
Contents
class Agilibox::SmallData::FilterStrategyByKeyValues < ::Agilibox::SmallData::FilterStrategy attr_reader :key def initialize(key = nil) @key = key end def apply(query, value) value = value.split(" ") if value.is_a?(String) value = value.select(&:present?) if value.any? query.where("#{key} IN (?)", value) else query end end end
Version data entries
33 entries across 33 versions & 1 rubygems