Sha256: e778e328d5bb36eda05da95c08e8240cd5bd2b749c141edddb69fc1cbae41c23

Contents?: true

Size: 1.01 KB

Versions: 7

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

# @api public
# @since 0.12.0
class Qonfig::DataSet
  # @option path [String, Pathname]
  # @option options [Hash<Symbol,Any>] Nothing, just for compatability and consistency
  # @param value_processor [Block]
  # @return [void]
  #
  # @api public
  # @since 0.12.0
  def save_to_toml(path:, options: Qonfig::Uploaders::TOML::DEFAULT_OPTIONS, &value_processor)
    thread_safe_access do
      Qonfig::Uploaders::TOML.upload(settings, path: path, options: options, &value_processor)
    end
  end
  alias_method :dump_to_toml, :save_to_toml

  # @param file_path [String, Pathmame]
  # @option strict [Boolean]
  # @option expose [NilClass, String, Symbol] Environment key
  # @param configuration [Block]
  # @return [void]
  #
  # @see Qonfig::DataSet#load_from_file
  #
  # @api public
  # @since 0.17.0
  # @version 0.21.0
  def load_from_toml(file_path, strict: true, expose: nil, &configuration)
    load_from_file(file_path, format: :toml, strict: strict, expose: expose, &configuration)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qonfig-0.28.0 lib/qonfig/plugins/toml/data_set.rb
qonfig-0.27.0 lib/qonfig/plugins/toml/data_set.rb
qonfig-0.26.0 lib/qonfig/plugins/toml/data_set.rb
qonfig-0.25.0 lib/qonfig/plugins/toml/data_set.rb
qonfig-0.24.1 lib/qonfig/plugins/toml/data_set.rb
qonfig-0.24.0 lib/qonfig/plugins/toml/data_set.rb
qonfig-0.23.0 lib/qonfig/plugins/toml/data_set.rb