Sha256: bcae348d31cc206b71581580cf584249df44ecafeee9c49fc88603589c8dcee7

Contents?: true

Size: 623 Bytes

Versions: 15

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

# @api private
# @since 0.17.0
class Qonfig::Loaders::Dynamic < Qonfig::Loaders::Basic
  class << self
    prepend(Module.new do
      # @param data [String]
      # @return [Object]
      #
      # @api private
      # @since 0.17.0
      def load(data)
        try_to_load_toml_data(data)
      rescue Qonfig::TOMLLoaderParseError
        super(data)
      end

      private

      # @param data [String]
      # @return [Object]
      #
      # @api private
      # @since 0.17.0
      def try_to_load_toml_data(data)
        Qonfig::Loaders::TOML.load(data)
      end
    end)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
qonfig-0.28.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.27.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.26.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.25.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.24.1 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.24.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.23.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.22.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.21.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.20.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.19.1 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.19.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.18.1 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.18.0 lib/qonfig/plugins/toml/loaders/dynamic.rb
qonfig-0.17.0 lib/qonfig/plugins/toml/loaders/dynamic.rb