Class: Oldfixversion::CLI::Actions::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/oldfixversion/cli/actions/config.rb

Overview

Handles the config action.

Instance Method Summary collapse

Constructor Details

#initialize(client: Configuration::Loader::CLIENT, **dependencies) ⇒ Config

Returns a new instance of Config.



10
11
12
13
14
# File 'lib/oldfixversion/cli/actions/config.rb', line 10

def initialize client: Configuration::Loader::CLIENT, **dependencies
  super(**dependencies)

  @client = client
end

Instance Method Details

#call(selection) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/oldfixversion/cli/actions/config.rb', line 16

def call selection
  case selection
    when :edit then edit
    when :view then view
    else logger.error { "Invalid configuration selection: #{selection}." }
  end
end