Class: ActiveRecord::Like::ScopeSpawners::NotLikeScopeSpawners::Rails71AndBelowSpawner

Inherits:
AbstractSpawner
  • Object
show all
Includes:
Shared::Rails7AndBelowSpawner
Defined in:
lib/active_record/like/scope_spawner.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from AbstractSpawner

#opts, #rest, #scope

Instance Method Summary collapse

Methods inherited from AbstractSpawner

#initialize, spawn

Constructor Details

This class inherits a constructor from ActiveRecord::Like::ScopeSpawners::NotLikeScopeSpawners::AbstractSpawner

Instance Method Details

#spawnObject

:nodoc:



206
207
208
209
210
211
# File 'lib/active_record/like/scope_spawner.rb', line 206

def spawn
  @opts = opts.reject { |_, v| v.is_a?(Array) && v.empty? }
  chain_node(Arel::Nodes::DoesNotMatch) do |nodes|
    Arel::Nodes::And.new(nodes)
  end
end