class

Augeas

Inherits Reference / Object

This is the main Augeas class, the entrypoint to all Augeas operations

Constants

VERSION = "0.1.0"

Constructors

new(root : String, loadpath : String | Nil = nil, flags : UInt32 = 0)

Initiale the class specifying your root, the lens loadpath and any flags Right now we are only forwaring the flags to LibAugeas, maybe in the future we can handle it more the crystal way™

Augeas.new(root: "/path/to/root", loadpath: "/path/to/leans", flags: 2)
Source

Instance methods

check_aug_error

Check error on augeas C struct

The main idea is to keep here all possible errors that can happen

Initially check augeas for an error, if not returns true, otherwise Fetch the error_message, error_minor_message and error_details

After that checks the error_message against known values, if any is found method raises an an exception passing error details as its message

Source
finalize

Close Augeas C Struct (to free everything related to it)

Source
flags

Augeas control flags specified on the .new

Source
load_file(path : String)

Load a file into the Augeas tree

load_file("/path/to/my-config-file")
Source
loadpath

Load path for augeas lens specified on the `.new

Source
root

Root specified on the .new

Source
save

Save all changes in the augeas tree to the respective files ps: Only modified files are written

tip: Do not forget to call this method after performing changes

Source
to_unsafe

Pointer to C Struct

Source

Nested types