Class: RangeResponse::Range

Inherits:
Struct
  • Object
show all
Defined in:
lib/dto/search/range_response.rb

Overview

Class Range represents elements of server response on range Search API request. Server response is sent to initializer which creates object with attributes field, min, max accessible via getters:

range = Range.new(...)
range.field   # => Array
range.min     # => 10
range.max     # => 20

Instance Attribute Summary collapse

Method Summary

Methods inherited from Struct

from_array, from_hash

Instance Attribute Details

#fieldObject

Returns the value of attribute field

Returns:

  • (Object)

    the current value of field



19
20
21
# File 'lib/dto/search/range_response.rb', line 19

def field
  @field
end

#maxObject

Returns the value of attribute max

Returns:

  • (Object)

    the current value of max



19
20
21
# File 'lib/dto/search/range_response.rb', line 19

def max
  @max
end

#minObject

Returns the value of attribute min

Returns:

  • (Object)

    the current value of min



19
20
21
# File 'lib/dto/search/range_response.rb', line 19

def min
  @min
end