class RBT::Commandline
Public Class Methods
Public Instance Methods
commandline_arguments?()
click to toggle source
create_new_cookbook_for(i)
click to toggle source
#¶ ↑
create_new_cookbook_for
¶ ↑
This method can create a new cookbook file - but only if the program has not yet been registered as part of RBT
.
#¶ ↑
# File lib/rbt/commandline/commandline.rb, line 222 def create_new_cookbook_for(i) require 'rbt/cookbooks/create_cookbook_yaml_file/create_cookbook_yaml_file.rb' _ = RBT.remove_archive_from_the_end(File.basename(i)) program_name = ProgramInformation.return_program_name(_) if RBT.is_a_registered_program? program_name e "The program #{program_name} is registered." else # else register it. e 'The program '+sfancy(program_name)+ ' is not registered.' e 'Thus, delegating towards class '+ steelblue('RBT::Cookbooks::CreateCookbookYamlFile')+ '.' mkdir(src_dir?+program_name) RBT::Cookbooks::CreateCookbookYamlFile.new(i) { :interactive_mode } end end
do_compile_these_programs( i = commandline_arguments? )
click to toggle source
require_class_compile()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset¶ ↑
#¶ ↑
Calls superclass method
RBT::Base#reset
# File lib/rbt/commandline/commandline.rb, line 52 def reset super() # ======================================================================= # # === @let_rbt_compile_handle_the_input # ======================================================================= # @let_rbt_compile_handle_the_input = false end
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/commandline/commandline.rb, line 242 def run # ======================================================================= # # We will first pass all commandline arguments into menu() here, # before we typically then delegate towards class RBT::Installer. # ======================================================================= # menu_for_the_commandline_arguments_as_string if @let_rbt_compile_handle_the_input menu(commandline_arguments?) end # ======================================================================= # # And check it again. # ======================================================================= # if @let_rbt_compile_handle_the_input require_class_compile do_compile_these_programs(commandline_arguments?) end end