15 lines
302 B
Ruby
15 lines
302 B
Ruby
|
class Logic::NotInDepartementOperator < Logic::InDepartementOperator
|
||
|
def operation
|
||
|
:n_est_pas_dans_le_departement
|
||
|
end
|
||
|
|
||
|
def compute(champs = [])
|
||
|
l = @left.compute_value_json(champs)
|
||
|
r = @right.compute(champs)
|
||
|
|
||
|
return false if l.nil?
|
||
|
|
||
|
l.fetch("code_departement") != r
|
||
|
end
|
||
|
end
|