Class: Indoctrinatr::Tools::Commands::Parse

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/indoctrinatr/tools/commands/parse.rb

Instance Method Summary collapse

Instance Method Details

#call(template_pack_name:) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/indoctrinatr/tools/commands/parse.rb', line 9

def call(template_pack_name:, **)
  template_pack_name = CommandAutocompleteHelpers.handle_autocomplete(template_pack_name)

  Indoctrinatr::Tools::Transactions::TemplatePackDefaultValuesParser.new.call(template_pack_name) do |result|
    result.success do |message|
      puts message
    end

    result.failure do |message|
      puts message
      exit 1
    end
  end
end