Sha256: 4a82823fe3fd494eef66cefe5b5cfad6c97eeb3e9210dcd00cb72930ce584315

Contents?: true

Size: 926 Bytes

Versions: 14

Compression:

Stored size: 926 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, "DELETE is not supported by your adapter."
        end
      end
      
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
restfully-0.6.0 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.10 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.9 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.8 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.7 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.6 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.5 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.4 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.3 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.2 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.1 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.5.0 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.4.1 lib/restfully/http/adapters/abstract_adapter.rb
restfully-0.4.0 lib/restfully/http/adapters/abstract_adapter.rb