Sha256: 7cf7808bddc2bd6e9ce3cf864c52ccbdcfa1ce41d1fe8727b6b07fa1916c4849

Contents?: true

Size: 662 Bytes

Versions: 16

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

# @api private
# @since 0.12.0
class Qonfig::Loaders::TOML < Qonfig::Loaders::Basic
  class << self
    # @param data [String]
    # @return [Object]
    #
    # @raise [Qonfig::TOMLLoaderParseError]
    #
    # @api private
    # @since 0.12.0
    def load(data)
      ::TomlRB.parse(ERB.new(data).result)
    rescue ::TomlRB::ParseError => error
      raise(Qonfig::TOMLLoaderParseError.new(error.message).tap do |exception|
        exception.set_backtrace(error.backtrace)
      end)
    end

    # @return [Object]
    #
    # @api private
    # @since 0.12.0
    def load_empty_data
      ::TomlRB.parse('')
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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