Class: Qonfig::Uploaders::TOML Private

Inherits:
File
  • Object
show all
Defined in:
lib/qonfig/plugins/toml/uploaders/toml.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.12.0

Constant Summary

Constants inherited from File

File::DEFAULT_OPTIONS, File::EMPTY_SETTINGS_REPRESENTATION, File::FILE_OPENING_MODE

Class Method Summary collapse

Methods inherited from File

upload

Methods inherited from Base

upload

Class Method Details

.represent_settings(settings, options, &value_processor) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • settings (Qonfig::Settings)
  • options (Hash<Symbol,Any>)
  • value_processor (Block)

Returns:

  • (String)

Since:

  • 0.12.0



14
15
16
17
18
19
20
21
22
23
# File 'lib/qonfig/plugins/toml/uploaders/toml.rb', line 14

def represent_settings(settings, options, &value_processor)
  settings_hash =
    if block_given?
      settings.__to_hash__(transform_value: value_processor)
    else
      settings.__to_hash__
    end

  ::TomlRB.dump(settings_hash)
end