Sha256: 8e00d2027ec2603264c345be0555c42c5d8411152379efb7dad65b7573fccf84

Contents?: true

Size: 795 Bytes

Versions: 120

Compression:

Stored size: 795 Bytes

Contents

module Acfs
  class Response

    # Method to fetch information about response status.
    #
    module Status

      # Return response status code. Will return zero if
      # request was not executed or failed on client side.
      #
      def status_code
        return @status.to_i if defined? :@status
        #return response.response_code unless response.nil?
        #0
      end
      alias :code :status_code

      # Return true if response was successful indicated by
      # response status code.
      #
      def success?
        code >= 200 && code < 300
      end

      # Return true unless response status code indicates that
      # resource was not modified according to send precondition headers.
      #
      def modified?
        code != 304
      end
    end
  end
end

Version data entries

120 entries across 120 versions & 1 rubygems

Version Path
acfs-0.42.0 lib/acfs/response/status.rb
acfs-0.41.1 lib/acfs/response/status.rb
acfs-0.41.1.beta1 lib/acfs/response/status.rb
acfs-0.41.0 lib/acfs/response/status.rb
acfs-0.40.1.rc1 lib/acfs/response/status.rb
acfs-0.40.0 lib/acfs/response/status.rb
acfs-0.39.1 lib/acfs/response/status.rb
acfs-0.39.0 lib/acfs/response/status.rb
acfs-1.0.0.dev.1.b305 lib/acfs/response/status.rb
acfs-0.38.0 lib/acfs/response/status.rb
acfs-1.0.0.dev.1.b298 lib/acfs/response/status.rb
acfs-1.0.0.dev.1.b297 lib/acfs/response/status.rb
acfs-0.37.0.1.b295 lib/acfs/response/status.rb
acfs-0.37.0 lib/acfs/response/status.rb
acfs-0.36.0.1.b293 lib/acfs/response/status.rb
acfs-0.36.0 lib/acfs/response/status.rb
acfs-0.35.0.1.b291 lib/acfs/response/status.rb
acfs-0.35.0 lib/acfs/response/status.rb
acfs-0.34.1.1.b289 lib/acfs/response/status.rb
acfs-0.34.1 lib/acfs/response/status.rb