Class: Translatomatic::CLI::Config
- Defined in:
- lib/translatomatic/cli/config.rb
Overview
Configuration functions for the command line interface
Instance Method Summary collapse
-
#describe ⇒ Object
Describe available configuration settings.
-
#list ⇒ Object
List current configuration settings.
-
#remove(key) ⇒ void
Remove a configuration setting.
-
#set(key, value) ⇒ String
Change a configuration setting.
Instance Method Details
#describe ⇒ Object
Describe available configuration settings
37 38 39 40 41 42 |
# File 'lib/translatomatic/cli/config.rb', line 37 def describe run do puts t("cli.config.configuration") print_config_table(:key, :type, :desc) end end |
#list ⇒ Object
List current configuration settings
27 28 29 30 31 32 |
# File 'lib/translatomatic/cli/config.rb', line 27 def list run do puts t("cli.config.configuration") print_config_table(:key, :value) end end |
#remove(key) ⇒ void
This method returns an undefined value.
Remove a configuration setting
20 21 22 |
# File 'lib/translatomatic/cli/config.rb', line 20 def remove(key) run { conf.remove(key) } end |
#set(key, value) ⇒ String
Change a configuration setting
11 12 13 |
# File 'lib/translatomatic/cli/config.rb', line 11 def set(key, value) run { conf.set(key, value) } end |