Class: EverSdk::Net::OrderBy
- Inherits:
-
Object
- Object
- EverSdk::Net::OrderBy
- Defined in:
- lib/ever_sdk_client/net.rb
Constant Summary collapse
- SORT_DIRECTION_VALUES =
[:asc, :desc]
Instance Attribute Summary collapse
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path:, direction:) ⇒ OrderBy
constructor
A new instance of OrderBy.
Constructor Details
#initialize(path:, direction:) ⇒ OrderBy
Returns a new instance of OrderBy.
30 31 32 33 34 35 36 37 |
# File 'lib/ever_sdk_client/net.rb', line 30 def initialize(path:, direction:) @path = path unless SORT_DIRECTION_VALUES.include?(direction) raise ArgumentError.new("direction #{direction} doesn't exist; existing values: #{SORT_DIRECTION_VALUES}") end @direction = direction end |
Instance Attribute Details
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
28 29 30 |
# File 'lib/ever_sdk_client/net.rb', line 28 def direction @direction end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
28 29 30 |
# File 'lib/ever_sdk_client/net.rb', line 28 def path @path end |