Sha256: 934f3c3f214410488a8c78c6f725bce0f4ddfcc56b002ac80e3f4d960dc353e9

Contents?: true

Size: 622 Bytes

Versions: 36

Compression:

Stored size: 622 Bytes

Contents

require "stringex/acts_as_url/adapter/base"
require "stringex/acts_as_url/adapter/active_record"
require "stringex/acts_as_url/adapter/data_mapper"
require "stringex/acts_as_url/adapter/mongoid"

module Stringex
  module ActsAsUrl
    module Adapter
      def self.add_loaded_adapter(adapter)
        @loaded_adapters << adapter
      end

      def self.load_available
        @loaded_adapters = []
        constants.each do |name|
          adapter = const_get(name)
          adapter.load if adapter.loadable?
        end
      end

      def self.first_available
        @loaded_adapters[0]
      end
    end
  end
end

Version data entries

36 entries across 35 versions & 2 rubygems

Version Path
stringex-2.2.0 lib/stringex/acts_as_url/adapter.rb
stringex-2.1.2 lib/stringex/acts_as_url/adapter.rb
stringex-2.1.1 lib/stringex/acts_as_url/adapter.rb
stringex-2.1.0 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.11 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.10 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.9 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.8 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.7 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.6 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.5 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.4 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.3 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.2 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.1 lib/stringex/acts_as_url/adapter.rb
stringex-2.0.0 lib/stringex/acts_as_url/adapter.rb