Module: CascadingConfiguration::Setting

Defined in:
lib/cascading_configuration/setting.rb

Overview

CascadingConfiguration::Setting allows definition of setting attributes that will retrieve

the first value defined in an instance looking up the ancestor chain.

Instance Method Summary collapse

Instance Method Details

#attr_instance_setting(*names) ⇒ Object

Cascading setting 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.

Parameters:

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

    The name to be used

Returns:

  • self



# File 'lib/cascading_configuration/setting.rb', line 39

#attr_local_setting(*names) ⇒ Object

Non-cascading setting 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.

Parameters:

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

    The name to be used

Returns:

  • self



# File 'lib/cascading_configuration/setting.rb', line 54

#attr_module_setting(*names) ⇒ Object

Cascading setting 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.

Parameters:

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

    The name to be used

Returns:

  • self



# File 'lib/cascading_configuration/setting.rb', line 24

#attr_setting(*names) ⇒ Object

Cascading setting 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.

Parameters:

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

    The name to be used

Returns:

  • self



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