Sha256: ae2758fd72fcff0af9752d18558764c128fe19594549c3d3ebe9e10d447b765e

Contents?: true

Size: 925 Bytes

Versions: 8

Compression:

Stored size: 925 Bytes

Contents

module Restfully
  module HTTP
    module Adapters
      
      class AbstractAdapter
        attr_reader :logger, :options
        def initialize(base_uri, options = {})
          @options = options.symbolize_keys
          @logger = @options.delete(:logger) || Restfully::NullLogger.new
          @base_uri = base_uri
          logger.debug "base_uri = #{base_uri.inspect}, options = #{options.inspect}."
        end
        
        def get(request)
          raise NotImplementedError, "GET is not supported by your adapter."
        end
        def post(request)
          raise NotImplementedError, "POST is not supported by your adapter."
        end
        def put(request)
          raise NotImplementedError, "PUT is not supported by your adapter."
        end
        def delete(request)
          raise NotImplementedError, "DELETEis not supported by your adapter."
        end
      end
      
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
crohr-restfully-0.2.1 lib/restfully/http/adapters/abstract_adapter.rb
crohr-restfully-0.2.2 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.3.2 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.3.1 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.3.0 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.2.3 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.2.2 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.2.1 lib/restfully/http/adapters/abstract_adapter.rb