Sha256: d6645f9da1e5b432a044deea86224012327715db0565f3a2f27014b3e0a132aa
Contents?: true
Size: 477 Bytes
Versions: 20
Compression:
Stored size: 477 Bytes
Contents
# frozen_string_literal: true require 'delegate' # ProxyRb module ProxyRb # An HTTP request class Request < SimpleDelegator # Was the request successful # # @return [TrueClass, FalseClass] # The result def successful? __getobj__.status_code.to_s.start_with?('2', '3') end # The request is forbidden # # @return [TrueClass, FalseClass] # The result def forbidden? __getobj__.status_code == 403 end end end
Version data entries
20 entries across 20 versions & 1 rubygems