Class: Rubysmith::CLI::Actions::Config
- Inherits:
-
Object
- Object
- Rubysmith::CLI::Actions::Config
- Defined in:
- lib/rubysmith/cli/actions/config.rb
Overview
Handles the config action.
Instance Method Summary collapse
- #call(selection) ⇒ Object
-
#initialize(client: Configuration::Loader::CLIENT) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(client: Configuration::Loader::CLIENT) ⇒ Config
Returns a new instance of Config.
10 11 12 13 |
# File 'lib/rubysmith/cli/actions/config.rb', line 10 def initialize(client: Configuration::Loader::CLIENT, **) super(**) @client = client end |
Instance Method Details
#call(selection) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/rubysmith/cli/actions/config.rb', line 15 def call selection case selection when :edit then edit when :view then view else logger.error { "Invalid configuration selection: #{selection}." } end end |