Augeas::File
Inherits Reference / Object
Usually the full path to the config file, needs to be speficied, when getting and setting values. Using this file, this is not needed.
Constructors
Instance methods
get(key)
Get a settings value from the config file
Let take postgresql as example, consider we have a config file like this data_directory = '/var/lib/postgresql/8.4/main' # use data in another directory
After instantiating the class, get can be used as:
get("data_directory")
# => "/var/lib/postgresql/8.4/main"
lens_name
Return the lens name for this file
When Augeas loads a file, it associates a lens with it, so this method looks up and returns the lens name
set(key, value)
Set a settings value on the config file
As Augeas keeps the modifications in memory, don't
forget to call Augeas#save after making changes
set("data_directory", "/path/to/data_directory")