Sha256: 36050de5b5eba637bd0342c974db40b58fefd57b7d590e72221e205cfe4da058
Contents?: true
Size: 808 Bytes
Versions: 16
Compression:
Stored size: 808 Bytes
Contents
# frozen_string_literal: true # @api private # @since 0.2.0 module Qonfig::Loaders require_relative 'loaders/basic' require_relative 'loaders/json' require_relative 'loaders/yaml' require_relative 'loaders/dynamic' require_relative 'loaders/end_data' class << self # @param format [String, Symbol] # @return [Module] # # @raise [Qonfig::UnsupportedLoaderFormatError] # # @api private # @since 0.15.0 def resolve(format) case format.to_s when 'yaml', 'yml' Qonfig::Loaders::YAML when 'json' Qonfig::Loaders::JSON when 'dynamic' Qonfig::Loaders::Dynamic else raise(Qonfig::UnsupportedLoaderFormatError, "<#{format}> format is not supported.") end end alias_method :[], :resolve end end
Version data entries
16 entries across 16 versions & 1 rubygems