Class: Cuprum::Collections::Constraints::Order::SortDirection
- Inherits:
-
Stannum::Constraints::Enum
- Object
- Stannum::Constraints::Enum
- Cuprum::Collections::Constraints::Order::SortDirection
- Defined in:
- lib/cuprum/collections/constraints/order/sort_direction.rb
Overview
Asserts that the object is a valid direction for a sort.
Constant Summary collapse
- NEGATED_TYPE =
The :type of the error generated for a matching object.
'cuprum.collections.constraints.is_valid_sort_direction'
- TYPE =
The :type of the error generated for a non-matching object.
'cuprum.collections.constraints.is_not_valid_sort_direction'
Class Method Summary collapse
-
.instance ⇒ Cuprum::Collections::Constraints::AttributeName
A cached instance of the constraint with default options.
Instance Method Summary collapse
-
#initialize(**options) ⇒ SortDirection
constructor
A new instance of SortDirection.
Constructor Details
#initialize(**options) ⇒ SortDirection
Returns a new instance of SortDirection.
22 23 24 |
# File 'lib/cuprum/collections/constraints/order/sort_direction.rb', line 22 def initialize(**) super(*sort_directions, **) end |
Class Method Details
.instance ⇒ Cuprum::Collections::Constraints::AttributeName
Returns a cached instance of the constraint with default options.
18 19 20 |
# File 'lib/cuprum/collections/constraints/order/sort_direction.rb', line 18 def self.instance @instance ||= new end |