Class: CountResponse

Inherits:
Struct show all
Defined in:
lib/dto/search/count_response.rb

Overview

Class CountResponse represents server response on count Search API request. Server response is sent to initializer which creates objects with attribute count accessible via getter:

response = CountResponse.new("count" => 20)
response.count  # => 20

Instance Attribute Summary collapse

Method Summary

Methods inherited from Struct

from_array, from_hash

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



8
9
10
# File 'lib/dto/search/count_response.rb', line 8

def count
  @count
end