class ConfigCat::FetchResponse
Public Class Methods
new(response)
click to toggle source
# File lib/configcat/configfetcher.rb, line 22 def initialize(response) @_response = response end
Public Instance Methods
is_fetched()
click to toggle source
Gets whether a new configuration value was fetched or not
# File lib/configcat/configfetcher.rb, line 32 def is_fetched() code = @_response.code.to_i return 200 <= code && code < 300 end
is_not_modified()
click to toggle source
Gets whether the fetch resulted a '304 Not Modified' or not
# File lib/configcat/configfetcher.rb, line 38 def is_not_modified() return @_response.code == "304" end
json()
click to toggle source
Returns the json-encoded content of a response, if any
# File lib/configcat/configfetcher.rb, line 27 def json() return JSON.parse(@_response.body) end