Class Preferences::Metadata
In: lib/preferences.rb
Parent: Object

Encapsulates the metadata that describes what preferences apply to a particular object.

Methods

new   prefs  

Attributes

key  [R]  The key under which all of the vars of the object are stored. The key may be hierarchical: "foo/bar/baz"—in which case a var is stored at [‘foo’][‘bar’][‘baz’][var] in the preferences. Two objects may share a key (in particular, the empty key).
vars  [R]  The list of vars of the object that are to persist. Each var is a a string or symbol naming a reader method. A corresponding writer method must also exist.

Public Class methods

The hierarchy is the complex structure (nested hashes) that is written to the prefs file.

Public Instance methods

Traverse the hierarchy to get the ground-level hash used for this object’s vars, filling in the hierarchy as needed with empty hashes.

[Validate]