Sha256: 23fb28f782bfc3ac1c82ae655b0f28a7767069e3b7b4cd4d9d2f03bf90f87855

Contents?: true

Size: 233 Bytes

Versions: 6

Compression:

Stored size: 233 Bytes

Contents

class Dorsale::SmallData::FilterStrategyByKeyValue < ::Dorsale::SmallData::FilterStrategy
  attr_reader :key

  def initialize(key = nil)
    @key = key
  end

  def apply(query, value)
    query.where("#{key} = ?", value)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dorsale-3.1.5 app/filters/dorsale/small_data/filter_strategy_by_key_value.rb
dorsale-3.1.4 app/models/dorsale/small_data/filter_strategy_by_key_value.rb
dorsale-3.1.3 app/models/dorsale/small_data/filter_strategy_by_key_value.rb
dorsale-3.1.2 app/models/dorsale/small_data/filter_strategy_by_key_value.rb
dorsale-3.1.1 app/models/dorsale/small_data/filter_strategy_by_key_value.rb
dorsale-3.1.0 app/models/dorsale/small_data/filter_strategy_by_key_value.rb