Class: ActiveRecord::Like::ScopeSpawners::LikeScopeSpawners::AbstractSpawner
- Inherits:
-
Object
- Object
- ActiveRecord::Like::ScopeSpawners::LikeScopeSpawners::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
88 89 90 91 92 |
# File 'lib/active_record/like/scope_spawner.rb', line 88 def initialize(scope, opts, *rest) @scope = scope @opts = opts @rest = rest end |
Instance Attribute Details
#opts ⇒ Object (readonly)
:nodoc:
65 66 67 |
# File 'lib/active_record/like/scope_spawner.rb', line 65 def opts @opts end |
#rest ⇒ Object (readonly)
:nodoc:
65 66 67 |
# File 'lib/active_record/like/scope_spawner.rb', line 65 def rest @rest end |
#scope ⇒ Object (readonly)
:nodoc:
65 66 67 |
# File 'lib/active_record/like/scope_spawner.rb', line 65 def scope @scope end |
Class Method Details
.spawn(*args) ⇒ Object
Spawn different scopes based on value Just delegates to new though
73 74 75 |
# File 'lib/active_record/like/scope_spawner.rb', line 73 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
98 99 100 |
# File 'lib/active_record/like/scope_spawner.rb', line 98 def spawn raise NotImplementedError end |