Sha256: 558706a6e6028b678daa8cef4f0c23bd656ac340a0c6eb544f438af80ef7c008

Contents?: true

Size: 233 Bytes

Versions: 1

Compression:

Stored size: 233 Bytes

Contents

module Metastore
  class StorageFactory

    def self.from_sym(symbol)
      klass = symbol.to_s.upcase
      Storage.const_get(klass)
    rescue NameError => e
      raise Errors::UnknownStorageType.new(e.message)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
metastore-0.3.0 lib/metastore/storage_factory.rb