Sha256: 803ef0ddef1d346a654b7d5a3e7f8248add60d4b0b086744716ffe41cde15382

Contents?: true

Size: 363 Bytes

Versions: 3

Compression:

Stored size: 363 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 && status < 300

          raise self
        end

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

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
eac_tools-0.76.0 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_tools-0.75.2 sub/eac_envs-http/lib/eac_envs/http/response/statuses.rb
eac_envs-http-0.4.1 lib/eac_envs/http/response/statuses.rb