X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/34d0bf15a6f4009de376ceed1d7d5cca24a8dfe7..f2ec7254120c90c3b023687f67a7b19f78b69370:/doc/Lyricli/Configuration.html?ds=sidebyside diff --git a/doc/Lyricli/Configuration.html b/doc/Lyricli/Configuration.html index 77112a3..f2fa54d 100644 --- a/doc/Lyricli/Configuration.html +++ b/doc/Lyricli/Configuration.html @@ -99,7 +99,19 @@
++This class handles the configuration of Lyricli +
+ + ++Ensure this is only called once. +
++Access configuration properties, loads config if needed beforehand. +
++Assigns a new value to a configuration key, loads config if needed and +saves it after updating. +
++Deletes a key from the configuration, loads config if needed and saves it +after deleting. +
+-A new instance of Configuration. +Defines the paths to the default and user configuration files.
-TODO: Apart from this, load a default yml that will be used for this. +Loads the configuration from the user file, attempts to create it from +defaults if it’s not present.
+Serializes the `@config` Hash to JSON and saves it to a file. +
+-A new instance of Configuration +Defines the paths to the default and user configuration files
@@ -330,14 +360,14 @@ A new instance of Configuration-4 -5 -6 7 -8+8 +9 +10 +11
# File 'lib/lyricli/configuration.rb', line 4 +# File 'lib/lyricli/configuration.rb', line 7 def initialize @config_path = "~/.lyricli.conf" @@ -365,18 +395,31 @@ A new instance of Configuration -
-12 -13 -14+17 +18 +19 |
- # File 'lib/lyricli/configuration.rb', line 12 +# File 'lib/lyricli/configuration.rb', line 17 def self.instance @@instance @@ -395,25 +438,77 @@ A new instance of Configuration |