Module: Cuprum::Collections::Commands::QueryCommand

Defined in:
lib/cuprum/collections/commands/query_command.rb

Overview

Shared functionality for defining commands that query the collection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#query#call (readonly)

Returns the query object used to access the collection data.

Returns:

  • (#call)

    the query object used to access the collection data.



19
20
21
# File 'lib/cuprum/collections/commands/query_command.rb', line 19

def query
  @query
end

Instance Method Details

#initialize(query:, **options) ⇒ Object

Parameters:

  • query (#call)

    the query object used to access the collection data.

  • options (Hash)

    additional options for the collection.



12
13
14
15
16
# File 'lib/cuprum/collections/commands/query_command.rb', line 12

def initialize(query:, **)
  super(**)

  @query = query
end