class

Glimmer::CLI::Config

Inherits Reference < Object

Config manages the application configuration.

Configuration is stored in YAML files at platform-specific paths.

Constants

VALID_STYLES = {"auto", "dark", "light", "ascii"}

Constructors

load

Loads configuration from the config file.

Returns default config if file doesn't exist.

Source
new(style : String = "auto", width : Int32 = 0, pager : Bool = false)
Source

Class methods

config_dir

Returns the path to the config directory.

Source
config_file

Returns the path to the config file.

Source
create_default

Creates the config file with default values if it doesn't exist.

Source
open_in_editor

Opens the config file in the default editor.

Source

Instance methods

pager=(pager : Bool)
Source
pager?
Source
save

Saves the configuration to the config file.

Source
style
Source
style=(style : String)
Source
to_yaml

Returns the configuration as a YAML string.

Source
width
Source
width=(width : Int32)
Source