Class: Minato::Utils::BaseCommand::NestedScopedIndex

Inherits:
Object
  • Object
show all
Includes:
SimpleCommand
Defined in:
lib/minato/utils/base_command/nested_scoped_index.rb

Instance Method Summary collapse

Constructor Details

#initialize(scope, context, model_class, parent_id) ⇒ NestedScopedIndex

Returns a new instance of NestedScopedIndex.



9
10
11
12
13
14
# File 'lib/minato/utils/base_command/nested_scoped_index.rb', line 9

def initialize(scope, context, model_class, parent_id)
  @scope = scope
  @context = context
  @model_class = model_class
  @parent_id = parent_id
end

Instance Method Details

#callObject



16
17
18
# File 'lib/minato/utils/base_command/nested_scoped_index.rb', line 16

def call
  @scope.new(@context, @model_class, @parent_id).resolve
end