class RBT::ShowManualSteps

Public Class Methods

new( commandline_arguments = nil, run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/utility_scripts/show_manual_steps.rb, line 32
def initialize(
    commandline_arguments = nil,
    run_already           = true
  )
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  run if run_already
end
of(i = ARGV) click to toggle source
#

RBT::ShowManualSteps.of

#
# File lib/rbt/utility_scripts/show_manual_steps.rb, line 91
def self.of(i = ARGV)
  new(i)
end

Public Instance Methods

report(i, this_program)
report_these_manual_steps(i, this_program) click to toggle source
#

report_these_manual_steps (report tag)

#
# File lib/rbt/utility_scripts/show_manual_steps.rb, line 68
def report_these_manual_steps(i, this_program)
  opne "#{rev}The following manual steps are known for the "\
       "program #{steelblue(this_program)}#{rev}:"
  if i.is_a? String
    i = i.split(N)
  end
  compacted_array = [i].flatten.compact
  compacted_array.shift if compacted_array.first.strip.empty? # Get rid of leading newlines here.
  padded = compacted_array.map {|entry|
    entry = entry.dup
    entry.prepend('  ')
    entry
  }
  e
  padded.each {|line|
    e mediumseagreen(line)
  }
  e
end
Also aliased as: report
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method RBT::LeanPrototype#reset
# File lib/rbt/utility_scripts/show_manual_steps.rb, line 46
def reset
  super()
  infer_the_namespace
end
run() click to toggle source
#

run (run tag)

#
# File lib/rbt/utility_scripts/show_manual_steps.rb, line 54
def run
  _ = first_argument?
  cookbook = RBT.cookbook_for(_)
  manual_steps = cookbook.manual_steps?
  if manual_steps and !manual_steps.empty?
    report_these_manual_steps(manual_steps, _)
  else
    opne "#{rev}No manual steps are known for #{sfancy(_)}#{rev}."
  end
end