Sha256: 02b7e1dbb37a28b846079f80f60f641b49773c7d9dcd99a0b98ceaae0b19f4cb
Contents?: true
Size: 612 Bytes
Versions: 30
Compression:
Stored size: 612 Bytes
Contents
module Mobility module Backends @backends = {} class << self # @param [Symbol, Object] backend Name of backend to load. def load_backend(name) return name if Module === name || name.nil? unless (backend = @backends[name]) require "mobility/backends/#{name}" raise LoadError, "backend #{name} did not register itself correctly in Mobility::Backends" unless (backend = @backends[name]) end backend end end def self.register_backend(name, mod) @backends[name] = mod end class LoadError < Error; end end end
Version data entries
30 entries across 30 versions & 1 rubygems