Class: Vercon::Commands::Init

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/vercon/commands/init.rb

Instance Method Summary collapse

Constructor Details

#initializeInit

Returns a new instance of Init.



12
13
14
15
16
17
18
19
# File 'lib/vercon/commands/init.rb', line 12

def initialize
  @stdout = Vercon::Stdout.new

  @config = Vercon::Config.new
  @config_existed = @config.exists?

  super
end

Instance Method Details

#call(**opts) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/vercon/commands/init.rb', line 21

def call(**opts)
  setup_token(opts)
  setup_claude_model(opts)
  setup_default_open(opts)

  @stdout.ok("Config file #{@config_existed ? "updated" : "created"}!")
end