class RBT::Ntrad
Public Class Methods
[](i = '')
click to toggle source
new( these_programs = ARGV, additional_parameters = nil, run_already = true )
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/ntrad.rb, line 25 def initialize( these_programs = ARGV, additional_parameters = nil, run_already = true ) reset set_compile_these_programs_in_a_non_traditional_manner( these_programs ) set_additional_parameters( additional_parameters ) run if run_already end
Public Instance Methods
compile_these_programs_in_a_non_traditional_manner?()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/ntrad.rb, line 90 def run @compile_these_programs_in_a_non_traditional_manner.each {|this_program| compile_object = RBT::Compile.new(this_program, :do_not_run_yet) { :do_not_check_whether_the_program_exists } # ===================================================================== # # Check whether the input is an existing file - in this case # we will use it. # ===================================================================== # if File.exist? this_program program_name = ::ProgramInformation[this_program].program_name? program_version = ::ProgramInformation[this_program].program_version? compile_object.set_program_name(program_name) compile_object.initialize_dataset compile_object.set_program_version(program_version) compile_object.set_archive_type(this_program) compile_object.set_base_dir Dir.pwd compile_object.set_program_full_name compile_object.rebuild_path end compile_object.do_run_via_nontraditional_way if @additional_parameters compile_object.menu(@additional_parameters) end compile_object.run } end
set_additional_parameters(i)
click to toggle source
set_compile_these_programs_in_a_non_traditional_manner(i = '')
click to toggle source
#¶ ↑
set_compile_these_programs_in_a_non_traditional_manner
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/ntrad.rb, line 58 def set_compile_these_programs_in_a_non_traditional_manner(i = '') i = [i].flatten.compact # ======================================================================= # # === Handle pwd usage next: # ======================================================================= # if i.first == 'pwd' i[0] = File.basename(Dir.pwd) end if i.empty? opnn; e 'No input has been provided. We will attempt to obtain a' opnn; e 'local file, as program instead.' # ===================================================================== # # Try to grab a random entry in this case, as the user has not # passed in any arguments. # ===================================================================== # random_entry = Dir['*'].sample require 'program_information' i << ProgramInformation.return_program_name(random_entry) end @compile_these_programs_in_a_non_traditional_manner = i end