Sha256: 8db736a03bcb1f127bdd9e716ae0abd426e5019a7b9f8da1ddb1093de0e3768f

Contents?: true

Size: 423 Bytes

Versions: 10

Compression:

Stored size: 423 Bytes

Contents

module CanTango
  class Configuration
    class Adapters < Registry::Base
      include Singleton

      def adapter name
        raise "Unknown adapter #{name}" if !available_adapters.include? name.to_sym
        require "cantango/adapter/#{name}"
      end

      def use *names
        names.each {|name| adapter name }
      end

      def available_adapters
        [:moneta, :compiler]
      end
    end
  end
end



Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cantango-config-0.1.9.2 lib/cantango/configuration/adapters.rb
cantango-config-0.1.8.1 lib/cantango/configuration/adapters.rb
cantango-config-0.1.8 lib/cantango/configuration/adapters.rb
cantango-config-0.1.7 lib/cantango/configuration/adapters.rb
cantango-config-0.1.6 lib/cantango/configuration/adapters.rb
cantango-config-0.1.5 lib/cantango/configuration/adapters.rb
cantango-config-0.1.4 lib/cantango/configuration/adapters.rb
cantango-config-0.1.3 lib/cantango/configuration/adapters.rb
cantango-config-0.1.2 lib/cantango/configuration/adapters.rb
cantango-config-0.1.1 lib/cantango/configuration/adapters.rb