Module: CascadingConfiguration::Hash

Defined in:
lib/cascading_configuration/hash.rb

Overview

CascadingConfiguration::Hash allows definition of hash attributes that will composite downward through

the ancestor chain.

Instance Method Summary collapse

Instance Method Details

#attr_hash(*names) {|| ... } ⇒ Object

Cascading hash attribute methods, which will affect instances according to include/extend pattern used.

for the declared attribute. If a hash is passed, each key will be used as the setting name and accessor and each value will be used as the corresponding write accessor.

and runs module_eval( & block ) on instance with provided block.

Parameters:

  • name (Symbol, String, Hash{Symbol,String=>Symbol,String}, Module)

    The name to be used

Yields:

  • ()

    Creates a new Module of type CascadingConfiguration::Core::InstanceController::ExtensionModule

Returns:

  • self



# File 'lib/cascading_configuration/hash.rb', line 8

#attr_instance_hash(*names) {|| ... } ⇒ Object

Cascading hash instance methods, which will affect instances of including modules according to

include/extend pattern used.

for the declared attribute. If a hash is passed, each key will be used as the setting name and accessor and each value will be used as the corresponding write accessor.

and runs module_eval( & block ) on instance with provided block.

Parameters:

  • name (Symbol, String, Hash{Symbol,String=>Symbol,String})

    The name to be used

Yields:

  • ()

    Creates a new Module of type CascadingConfiguration::Core::InstanceController::ExtensionModule

Returns:

  • self



# File 'lib/cascading_configuration/hash.rb', line 45

#attr_local_hash(*names) {|| ... } ⇒ Object

Non-cascading hash methods that will affect the instance declared on as well as instances of that instance,

if applicable.

for the declared attribute. If a hash is passed, each key will be used as the setting name and accessor and each value will be used as the corresponding write accessor.

and runs module_eval( & block ) on instance with provided block.

Parameters:

  • name (Symbol, String, Hash{Symbol,String=>Symbol,String})

    The name to be used

Yields:

  • ()

    Creates a new Module of type CascadingConfiguration::Core::InstanceController::ExtensionModule

Returns:

  • self



# File 'lib/cascading_configuration/hash.rb', line 63

#attr_module_hash(*names) {|| ... } ⇒ Object

Cascading hash attribute module/class methods, which will affect all module singletons

according to include/extend pattern used.

for the declared attribute. If a hash is passed, each key will be used as the setting name and accessor and each value will be used as the corresponding write accessor.

and runs module_eval( & block ) on instance with provided block.

Parameters:

  • name (Symbol, String, Hash{Symbol,String=>Symbol,String})

    The name to be used

Yields:

  • ()

    Creates a new Module of type CascadingConfiguration::Core::InstanceController::ExtensionModule

Returns:

  • self



# File 'lib/cascading_configuration/hash.rb', line 27