Class: Redis::Commands::Search::Asc

Inherits:
Object
  • Object
show all
Defined in:
lib/redis/commands/modules/search/aggregation.rb

Overview

Wraps a field name with an ascending (+ASC+) sort order for Redis::Commands::Search::AggregateRequest#sort_by.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Asc

Returns a new instance of Asc.

Parameters:

  • name (String)

    the field name to sort ascending



167
168
169
170
# File 'lib/redis/commands/modules/search/aggregation.rb', line 167

def initialize(name)
  @name = name
  @order = 'ASC'
end

Instance Attribute Details

#nameString (readonly)

Returns:

  • (String)

    the field name

  • (String)

    the order keyword, always "ASC"



164
165
166
# File 'lib/redis/commands/modules/search/aggregation.rb', line 164

def name
  @name
end

#orderString (readonly)

Returns:

  • (String)

    the field name

  • (String)

    the order keyword, always "ASC"



164
165
166
# File 'lib/redis/commands/modules/search/aggregation.rb', line 164

def order
  @order
end