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:
-
See core configuration object
Nucleon::Config
-
See collection
Nucleon::Config::Collection
Public Instance Methods
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 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 from collection.
See:
# File lib/core/mixin/config/collection.rb 61 def delete_property(name) 62 Config::Collection.delete(name) 63 end
Return specified property value.
See:
# File lib/core/mixin/config/collection.rb 43 def get_property(name) 44 Config::Collection.get(name) 45 end
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 value.
See:
# File lib/core/mixin/config/collection.rb 52 def set_property(name, value) 53 Config::Collection.set(name, value) 54 end