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
51 52 53 54 55 |
# File 'lib/translatomatic/cli/config.rb', line 51 def describe run do print_config_table(columns: [:key, :type, :desc]) end end |
#list ⇒ Object
List current configuration settings
38 39 40 41 42 43 44 45 |
# File 'lib/translatomatic/cli/config.rb', line 38 def list run do print_config_table(columns: [:key, :value], context: cli_option(:context), skip_blanks: true ) end end |
#remove(key) ⇒ void
This method returns an undefined value.
Remove a configuration setting
30 31 32 |
# File 'lib/translatomatic/cli/config.rb', line 30 def remove(key) run { conf.remove(key, cli_option(:context)) } end |
#set(key, *value) ⇒ String
Change a configuration setting
20 21 22 |
# File 'lib/translatomatic/cli/config.rb', line 20 def set(key, *value) run { conf.set(key, value, cli_option(:context)) } end |