Class: Tetra::GenerateScriptSubcommand

Inherits:
Subcommand
  • Object
show all
Defined in:
lib/tetra/ui/generate_script_subcommand.rb

Overview

tetra generate-script

Instance Method Summary collapse

Instance Method Details

#executeObject



6
7
8
9
10
11
12
13
14
# File 'lib/tetra/ui/generate_script_subcommand.rb', line 6

def execute
  checking_exceptions do
    project = Tetra::Project.new(".")
    ensure_dry_running(:has_finished, project) do
      result_path, conflict_count = Tetra::Package.new(project).to_script
      print_generation_result(project, result_path, conflict_count)
    end
  end
end