Class Grape::Util::InheritableSetting
In: lib/grape/util/inheritable_setting.rb
Parent: Object

A branchable, inheritable settings object which can store both stackable and inheritable values (see InheritableValues and StackableValues).

Methods

Attributes

api_class  [RW] 
namespace  [RW] 
namespace_inheritable  [RW] 
namespace_reverse_stackable  [RW] 
namespace_stackable  [RW] 
parent  [RW] 
point_in_time_copies  [RW] 
route  [RW] 

Public Class methods

Retrieve global settings.

Instantiate a new settings instance, with blank values. The fresh instance can then be set to inherit from an existing instance (see inherit_from).

Clear all global settings. @api private @note only for testing

Public Instance methods

Return the class-level global properties.

Set our inherited values to the given parent‘s current values. Also, update the inherited values on any settings instances which were forked from us. @param parent [InheritableSetting]

Create a point-in-time copy of this settings instance, with clones of all our values. Note that, should this instance‘s parent be set or changed via inherit_from, it will copy that inheritence to any copies which were made.

Resets the instance store of per-route settings. @api private

Return a serializable hash of our values.

[Validate]