Class: Hecks::QuerySpecification::Common::OrderBy

Inherits:
Struct
  • Object
show all
Defined in:
lib/hecks/query_specification/common/order_by.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#directionObject

Returns the value of attribute direction

Returns:

  • (Object)

    the current value of direction



4
5
6
# File 'lib/hecks/query_specification/common/order_by.rb', line 4

def direction
  @direction
end

#fieldObject

Returns the value of attribute field

Returns:

  • (Object)

    the current value of field



4
5
6
# File 'lib/hecks/query_specification/common/order_by.rb', line 4

def field
  @field
end

Instance Method Details

#to_hObject



5
# File 'lib/hecks/query_specification/common/order_by.rb', line 5

def to_h = { field: field.to_s, direction: direction.to_s }