Class: Momento::SortOrder

Inherits:
Object
  • Object
show all
Defined in:
lib/momento/response/sort_order.rb

Overview

Represents whether a collection is sorted in ascending or descending fashion.

Constant Summary collapse

ASCENDING =
:ascending
DESCENDING =
:descending

Class Method Summary collapse

Class Method Details

.valid?(order) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/momento/response/sort_order.rb', line 7

def self.valid?(order)
  [ASCENDING, DESCENDING].include?(order)
end