Sha256: b0ca1190f5c06dff01827308b9f18245164093ef37cbb237af364c8eb81c673f
Contents?: true
Size: 382 Bytes
Versions: 5
Compression:
Stored size: 382 Bytes
Contents
class Dorsale::SmallData::FilterStrategyByKeyValue < ::Dorsale::SmallData::FilterStrategy attr_reader :key def initialize(key = nil) @key = key end def apply(query, value) value = true if value == "true" value = false if value == "false" value = nil if value == "nil" value = nil if value == "null" query.where("#{key} = ?", value) end end
Version data entries
5 entries across 5 versions & 1 rubygems