class Pragma::Filter::Where
Attributes
condition[R]
Public Class Methods
new(condition:, **other)
click to toggle source
Calls superclass method
Pragma::Filter::Base::new
# File lib/pragma/filter/where.rb, line 8 def initialize(condition:, **other) super(**other) @condition = condition end
Public Instance Methods
apply(relation:, value:)
click to toggle source
# File lib/pragma/filter/where.rb, line 13 def apply(relation:, value:) relation.where(condition, value: value) end