Sha256: 89b482fe8fd489f4ebcc8264001ca851ec25bc472ce047454e1204d624603e22

Contents?: true

Size: 398 Bytes

Versions: 10

Compression:

Stored size: 398 Bytes

Contents

module Trestle
  module Adapters
    extend ActiveSupport::Autoload

    require_relative "adapters/adapter"

    autoload :ActiveRecordAdapter
    autoload :DraperAdapter
    autoload :SequelAdapter

    # Creates a new Adapter class with the given modules mixed in
    def self.compose(*modules)
      Class.new(Adapter) do
        modules.each { |mod| include(mod) }
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
trestle-0.10.1 lib/trestle/adapters.rb
trestle-0.10.0 lib/trestle/adapters.rb
trestle-0.10.0.pre2 lib/trestle/adapters.rb
trestle-0.10.0.pre lib/trestle/adapters.rb
trestle-0.9.8 lib/trestle/adapters.rb
trestle-0.9.7 lib/trestle/adapters.rb
trestle-0.9.6 lib/trestle/adapters.rb
trestle-0.9.5 lib/trestle/adapters.rb
trestle-0.9.4 lib/trestle/adapters.rb
trestle-0.9.3 lib/trestle/adapters.rb