Exception: Tomo::Runtime::SettingsRequiredError
- Defined in:
- lib/tomo/runtime/settings_required_error.rb
Instance Attribute Summary collapse
-
#command_name ⇒ Object
Returns the value of attribute command_name.
-
#settings ⇒ Object
Returns the value of attribute settings.
-
#task ⇒ Object
Returns the value of attribute task.
Instance Method Summary collapse
Methods inherited from Error
Methods included from Colors
Instance Attribute Details
#command_name ⇒ Object
Returns the value of attribute command_name.
6 7 8 |
# File 'lib/tomo/runtime/settings_required_error.rb', line 6 def command_name @command_name end |
#settings ⇒ Object
Returns the value of attribute settings.
6 7 8 |
# File 'lib/tomo/runtime/settings_required_error.rb', line 6 def settings @settings end |
#task ⇒ Object
Returns the value of attribute task.
6 7 8 |
# File 'lib/tomo/runtime/settings_required_error.rb', line 6 def task @task end |
Instance Method Details
#to_console ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tomo/runtime/settings_required_error.rb', line 8 def to_console <<~ERROR The #{yellow(task)} task requires #{settings_sentence} Settings can be specified in #{blue(DEFAULT_CONFIG_PATH)}, or by running tomo with the #{blue('-s')} option. For example: #{blue("tomo -s #{settings.first}=foo")} You can also use environment variables: #{blue("TOMO_#{settings.first.upcase}=foo tomo #{command_name}")} ERROR end |