module Nucleon::Mixin::ConfigCollection

Configuration collection

The Nucleon::Mixin::ConfigCollection module extends a class to include methods for working with the global property collection.

Right now, largely for historical reasons, the Nucleon::Config::Collection class is structured as a global interface and collection for grouping all of the defined options. It was originally contained within Nucleon::Config as part of the global configuration interface. In the future, the class and this mixin will be refactored to support multiple property logs and will have more fully refined persistence methods.

For usage and definition:

Public Instance Methods

all_properties() click to toggle source

Return a reference to all of the globally defined properties.

This method generally should not be used in favor of the ::get method.

See:

   # File lib/core/mixin/config/collection.rb
34 def all_properties
35   Config::Collection.all
36 end
clear_properties() click to toggle source

Clear all properties from the collection.

See:

   # File lib/core/mixin/config/collection.rb
70 def clear_properties
71   Config::Collection.clear
72 end
delete_property(name) click to toggle source

Delete property from collection.

See:

   # File lib/core/mixin/config/collection.rb
61 def delete_property(name)
62   Config::Collection.delete(name)
63 end
get_property(name) click to toggle source

Return specified property value.

See:

   # File lib/core/mixin/config/collection.rb
43 def get_property(name)
44   Config::Collection.get(name)
45 end
save_properties(options = {}) click to toggle source

Dump properties to disk.

See:

   # File lib/core/mixin/config/collection.rb
79 def save_properties(options = {})
80   Config::Collection.save(options)
81 end
set_property(name, value) click to toggle source

Set property value.

See:

   # File lib/core/mixin/config/collection.rb
52 def set_property(name, value)
53   Config::Collection.set(name, value)
54 end