Sha256: 9d15ce141a6eea45be4ccabb99a4f1f2545b1642b4cb12c210a68e93dbdade43

Contents?: true

Size: 347 Bytes

Versions: 17

Compression:

Stored size: 347 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module EacEnvs
  module Http
    class Response < ::StandardError
      module Statuses
        def raise_unless_200
          return nil if status == 200

          raise self
        end

        def status
          performed.status.to_i
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
eac_tools-0.75.1 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.75.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.74.1 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.74.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.73.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.72.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_envs-http-0.4.0 lib/eac_envs/http/response/statuses.rb
eac_tools-0.70.1 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.70.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.69.1 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.69.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.68.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.67.1 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.67.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.66.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_envs-http-0.3.2 lib/eac_envs/http/response/statuses.rb
eac_tools-0.65.1 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb