Class: Ace::Assign::CLI::Commands::Step

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
AssignmentTarget, Support::Cli::Base
Defined in:
lib/ace/assign/cli/commands/step.rb

Overview

Print instructions for the current, next, or an explicit step.

Instance Method Summary collapse

Instance Method Details

#call(step: nil, **options) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ace/assign/cli/commands/step.rb', line 19

def call(step: nil, **options)
  target = resolve_assignment_target(options)
  view = resolve_assignment_view(target)
  inspected = resolve_step(view, step, target)

  return if options[:quiet]

  if inspected
    puts inspected.instructions
  else
    puts no_work_message(view)
  end
end