Sha256: 912eefefad8bbef63c6e83a5cf50835b8d83ba456ef04bf6d096ffb20d831604

Contents?: true

Size: 632 Bytes

Versions: 29

Compression:

Stored size: 632 Bytes

Contents

require 'riak/util/headers'

module Riak
  class Client
    class HTTPBackend
      # @private
      class RequestHeaders < Riak::Util::Headers
        alias each each_capitalized

        def initialize(hash)
          initialize_http_header(hash)
        end

        def to_a
          [].tap do |arr|
            each_capitalized do |k,v|
              arr << "#{k}: #{v}"
            end
          end
        end

        def to_hash
          {}.tap do |hash|
            each_capitalized do |k,v|
              hash[k] ||= []
              hash[k] << v
            end
          end
        end
      end
    end
  end
end

Version data entries

29 entries across 19 versions & 3 rubygems

Version Path
riak-client-1.4.5 lib/riak/client/http_backend/request_headers.rb
riak-client-1.4.4.1 lib/riak/client/http_backend/request_headers.rb
riak-client-1.4.4 lib/riak/client/http_backend/request_headers.rb
riak-client-1.4.3 lib/riak/client/http_backend/request_headers.rb
riak-client-1.4.2 lib/riak/client/http_backend/request_headers.rb
riak-client-1.4.1 lib/riak/client/http_backend/request_headers.rb
riak-client-1.4.0 lib/riak/client/http_backend/request_headers.rb
riak-client-1.2.0 lib/riak/client/http_backend/request_headers.rb
riak-client-1.1.1 lib/riak/client/http_backend/request_headers.rb
riak-client-1.1.0 lib/riak/client/http_backend/request_headers.rb
better-riak-client-1.0.7 lib/riak/client/http_backend/request_headers.rb
better-riak-client-1.0.6 lib/riak/client/http_backend/request_headers.rb
riak-client-1.0.5 lib/riak/client/http_backend/request_headers.rb
better-riak-client-1.0.5 lib/riak/client/http_backend/request_headers.rb
riak-client-1.0.3 pkg/riak-client-1.0.2/pkg/riak-client-1.0.1/lib/riak/client/http_backend/request_headers.rb
riak-client-1.0.3 pkg/riak-client-1.0.2/pkg/riak-client-1.0.0/lib/riak/client/http_backend/request_headers.rb
riak-client-1.0.3 pkg/riak-client-1.0.2/lib/riak/client/http_backend/request_headers.rb
riak-client-1.0.3 pkg/riak-client-1.0.1/pkg/riak-client-1.0.0/lib/riak/client/http_backend/request_headers.rb
riak-client-1.0.3 pkg/riak-client-1.0.1/lib/riak/client/http_backend/request_headers.rb
riak-client-1.0.3 pkg/riak-client-1.0.0/lib/riak/client/http_backend/request_headers.rb