Sha256: 1d81817696940c8fb174c8e0ac73004ab78cedb056764998fedd60f2e52c4617
Contents?: true
Size: 511 Bytes
Versions: 1
Compression:
Stored size: 511 Bytes
Contents
module Quebert class Configuration attr_accessor :backend def self.from_hash(hash) hash, config = Support.symbolize_keys(hash), new # Find out backend from the registry and configure if backend = Quebert.backends[hash.delete(:backend).to_sym] # If the backend supports configuration, do it! p backend config.backend = backend.respond_to?(:configure) ? backend.configure(Support.symbolize_keys(hash)) : backend.new end config end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quebert-0.0.0 | lib/quebert/configuration.rb |