lib/freno/client/result.rb in freno-client-0.8.1 vs lib/freno/client/result.rb in freno-client-0.8.2

- old
+ new

@@ -1,11 +1,12 @@ +# frozen_string_literal: true + require "json" module Freno class Client class Result - # https://github.com/github/freno/blob/master/doc/http.md#status-codes FRENO_STATUS_CODE_MEANINGS = { 200 => :ok, 404 => :not_found, 417 => :expectation_failed, @@ -53,9 +54,10 @@ @body ||= JSON.parse(raw_body) if raw_body end def ==(other) return meaning == other if other.is_a? Symbol + code == other end end end end