Class: EverSdk::Net::OrderBy

Inherits:
Object
  • Object
show all
Defined in:
lib/ever_sdk_client/net.rb

Constant Summary collapse

SORT_DIRECTION_VALUES =
[:asc, :desc]

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#directionObject (readonly)

Returns the value of attribute direction.



28
29
30
# File 'lib/ever_sdk_client/net.rb', line 28

def direction
  @direction
end

#pathObject (readonly)

Returns the value of attribute path.



28
29
30
# File 'lib/ever_sdk_client/net.rb', line 28

def path
  @path
end