Method: TinyClient::Response#total_count

Defined in:
lib/tiny_client/response.rb

#total_countInteger

Parse the X-Total-Count header

Returns:

  • (Integer)

    the value of the X-Total-Count header, or nil if not present



26
27
28
29
# File 'lib/tiny_client/response.rb', line 26

def total_count
  count = header_str[/X-Total-Count: ([0-9]+)/, 1]
  count.present? ? count.to_i : nil
end