Class ConfigToolkit::HashWriter

  1. lib/configtoolkit/hashwriter.rb
BaseConfig KeyValueConfig ConfigToolkitConfig Writer PrettyPrintWriter HashWriter KeyValueWriter YAMLWriter Reader YAMLReader KeyValueReader OverrideReader RubyReader HashReader RuntimeError Error HashArrayVisitor ConstrainedArray Boolean VERSION ConfigToolkit dot/f_0.png

This class implements a no-op Writer interface. An instance simply stores the last Hash passed to its write method.

See Hash.txt for more details.

Methods

public instance

  1. require_symbol_parameter_names?
  2. write

Attributes

config_hash [R] This is set by the argument to write.

Public instance methods

require_symbol_parameter_names? ()

Returns:

Returns true, since the HashWriter requires Symbol parameter names in the Hash passed to write.

[show source]
# File lib/configtoolkit/hashwriter.rb, line 24
  def require_symbol_parameter_names?
    return true
  end
write (config_hash, containing_object_name)

Description:

This method sets the config_hash attribute to the config_hash argument, modified to reflect a containing_object_name containing object.

Parameters:

config_hash
The new value of the config_hash attribute, modified to reflect a containing_object_name containing object
containing_object_name
The configuration’s containing object name
[show source]
# File lib/configtoolkit/hashwriter.rb, line 40
  def write(config_hash, containing_object_name)
    @config_hash = create_containing_object_hash(config_hash, containing_object_name)
  end