class Qonfig::Uploaders::File

@api private @since 0.11.0

Constants

DEFAULT_OPTIONS

@return [Hash]

@api private @since 0.11.0

EMPTY_SETTINGS_REPRESENTATION

@return [String]

@api private @since 0.11.0

FILE_OPENING_MODE

@return [String]

@api private @since 0.11.0

Public Class Methods

upload(settings, path:, options: self::DEFAULT_OPTIONS, &value_processor) click to toggle source

@param settings [Qonfig::Settings] @param value_processor [Block] @option path [String, Pathname] @option options [Hash<Symbol|String,Any>] @return [void]

@api private @since 0.11.0

# File lib/qonfig/uploaders/file.rb, line 33
def upload(settings, path:, options: self::DEFAULT_OPTIONS, &value_processor)
  ::File.open(path, FILE_OPENING_MODE) do |file_descriptor|
    settings_representation = represent_settings(settings, options, &value_processor)
    file_descriptor.write(settings_representation)
  end
end

Private Class Methods

represent_settings(settings, options, &value_processor) click to toggle source

@param settings [Qonfig::Settings] @param options [Hash<Symbol|String,Any>] @param value_processor [Block] @return [String]

@api private @since 0.11.0

# File lib/qonfig/uploaders/file.rb, line 49
def represent_settings(settings, options, &value_processor)
  # :nocov:
  EMPTY_SETTINGS_REPRESENTATION
  # :nocov:
end