Sha256: fd9cf6dfe00cdeaeea2f40bdd0fdb326a957950c6ce7755abb01359606541d13

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 Bytes

Contents

module DataMapper
  module Adapters
      
    class AbstractAdapter
  
      # Instantiate an Adapter by passing it a DataMapper::Database
      # object for configuration.
      def initialize(configuration)
        @configuration = configuration
      end
      
      def index_path
        @configuration.index_path
      end
      
      def name
        @configuration.name
      end
      
      def delete(instance_or_klass, options = nil)
        raise NotImplementedError.new
      end
      
      def save(session, instance)
        raise NotImplementedError.new
      end
      
      def load(session, klass, options)
        raise NotImplementedError.new
      end
      
      def logger
        @logger || @logger = @configuration.logger
      end
      
    end # class AbstractAdapter
    
  end # module Adapters
end # module DataMapper

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datamapper-0.2.3 lib/data_mapper/adapters/abstract_adapter.rb