Class: ActiveRecord::Like::ScopeSpawners::NotLikeScopeSpawners::AbstractSpawner
- Inherits:
-
Object
- Object
- ActiveRecord::Like::ScopeSpawners::NotLikeScopeSpawners::AbstractSpawner
- Defined in:
- lib/active_record/like/scope_spawner.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
:nodoc:.
-
#rest ⇒ Object
readonly
:nodoc:.
-
#scope ⇒ Object
readonly
:nodoc:.
Class Method Summary collapse
-
.spawn(*args) ⇒ Object
Spawn different scopes based on value Just delegates to new though.
Instance Method Summary collapse
-
#initialize(scope, opts, *rest) ⇒ AbstractSpawner
constructor
Assign ivar only Actual operation is in #spawn.
-
#spawn ⇒ ActiveRecord::Relation
Spawn different scopes based on value Data conversion and query string generation are handled by different spanwer classes.
Constructor Details
#initialize(scope, opts, *rest) ⇒ AbstractSpawner
Assign ivar only Actual operation is in #spawn
186 187 188 189 190 |
# File 'lib/active_record/like/scope_spawner.rb', line 186 def initialize(scope, opts, *rest) @scope = scope @opts = opts @rest = rest end |
Instance Attribute Details
#opts ⇒ Object (readonly)
:nodoc:
163 164 165 |
# File 'lib/active_record/like/scope_spawner.rb', line 163 def opts @opts end |
#rest ⇒ Object (readonly)
:nodoc:
163 164 165 |
# File 'lib/active_record/like/scope_spawner.rb', line 163 def rest @rest end |
#scope ⇒ Object (readonly)
:nodoc:
163 164 165 |
# File 'lib/active_record/like/scope_spawner.rb', line 163 def scope @scope end |
Class Method Details
.spawn(*args) ⇒ Object
Spawn different scopes based on value Just delegates to new though
171 172 173 |
# File 'lib/active_record/like/scope_spawner.rb', line 171 def self.spawn(*args) new(*args).spawn end |
Instance Method Details
#spawn ⇒ ActiveRecord::Relation
Spawn different scopes based on value Data conversion and query string generation are handled by different spanwer classes
196 197 198 |
# File 'lib/active_record/like/scope_spawner.rb', line 196 def spawn raise NotImplementedError end |