Class: Umwelt::CLI::Commands::Convey

Inherits:
Hanami::CLI::Command
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/umwelt/cli/commands/convey.rb

Instance Method Summary collapse

Instance Method Details

#call(phase:, semantic:, **options) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/umwelt/cli/commands/convey.rb', line 32

def call(phase:, semantic:, **options)
  puts "Buildung phase: #{phase} with semantic #{semantic}..."

  if phase.to_i.zero?
    puts 'Error: Phase must be an integer'
    return
  end

  report(
    Umwelt::Command::Convey.new.call(
      phase_id: phase.to_i,
      semantic: classify(semantic).to_sym,
      source: Pathname.new(options.fetch(:source)),
      target: Pathname.new(options.fetch(:target))
    )
  )
end