class Cookbooks::ReportTheRegisteredPrograms

Constants

NAMESPACE
#

NAMESPACE

#
SHOW_CLASS_NAME
#

SHOW_CLASS_NAME

#

Public Class Methods

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

initialize

#
# File lib/cookbooks/utility_scripts/report_the_registered_programs.rb, line 39
def initialize(
    commandline_arguments = ARGV,
    run_already           = true
  )
  reset
  if commandline_arguments
    unless commandline_arguments.empty?
      case commandline_arguments.first # Use --short if you want to have a shorter variant instead.
      when 'do_not_show_the_class_name','--short'
        @show_class_name = false
      end
    end
  end
  run if run_already
end

Public Instance Methods

do_report_how_many_programs_are_registered() click to toggle source
#

#do_report_how_many_programs_are_registered

#
# File lib/cookbooks/utility_scripts/report_the_registered_programs.rb, line 80
def do_report_how_many_programs_are_registered
  opnn if show_class_name?
  e sfancy(Cookbooks.n_programs_available?)+' programs are '\
    'registered in the cookbooks as of '+simp(return_date)+'.'
end
opnn() click to toggle source
#

opnn

#
Calls superclass method Cookbooks::Base#opnn
# File lib/cookbooks/utility_scripts/report_the_registered_programs.rb, line 73
def opnn
  super(NAMESPACE)
end
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method Cookbooks::Base#reset
# File lib/cookbooks/utility_scripts/report_the_registered_programs.rb, line 58
def reset
  super()
  @show_class_name = SHOW_CLASS_NAME
end
run() click to toggle source
#

run (run tag)

#
# File lib/cookbooks/utility_scripts/report_the_registered_programs.rb, line 89
def run
  do_report_how_many_programs_are_registered
end
show_class_name?() click to toggle source
#

show_class_name?

#
# File lib/cookbooks/utility_scripts/report_the_registered_programs.rb, line 66
def show_class_name?
  @show_class_name
end