class RBT::CompileIntoHomeDir

Constants

NAMESPACE
#

NAMESPACE

#

Public Class Methods

[](i = '') click to toggle source
#

RBT::CompileIntoHomeDir[]

#
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 116
def self.[](i = '')
  self.new(i)
end
new( i = ARGV, run_already = true ) { || ... } click to toggle source
#

initialize

#
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 30
def initialize(
    i           = ARGV,
    run_already = true
  )
  reset
  set_compile_these_programs(
    i
  )
  if block_given?
    yielded = yield
    set_commandline_arguments(yielded)
  end
  run if run_already
end

Public Instance Methods

commandline_arguments?() click to toggle source
#

commandline_arguments?

#
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 64
def commandline_arguments?
  @commandline_arguments
end
compile_which_programs?() click to toggle source
#

compile_which_programs?

#
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 78
def compile_which_programs?
  @compile_these_programs
end
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method RBT::Base#reset
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 48
def reset
  super()
  @namespace = NAMESPACE
  set_commandline_arguments
end
run() click to toggle source
#

run (run tag)

#
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 94
def run
  # ======================================================================= #
  # Instantiate our compile-object next:
  # ======================================================================= #
  _ = RBT::Compile.new(:do_not_run_yet)
  compile_these_programs = compile_which_programs?
  compile_these_programs.each {|this_program|
    opnn; e "Now attempting to compile the program `#{orange(this_program)}`."
    _.reset
    _.set_compile_this_program(this_program)
    _.prepare_dataset_for(this_program)
    _.set_user_prefix('$HOME')
    if without_symlinking?
      _.do_not_symlink { :be_verbose }
    end
    _.do_compile_this_program(this_program)
  }
end
set_commandline_arguments(i = nil) click to toggle source
#

set_commandline_arguments

#
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 57
def set_commandline_arguments(i = nil)
  @commandline_arguments = [i].flatten.compact
end
set_compile_these_programs(i) click to toggle source
#

set_compile_these_programs

#
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 71
def set_compile_these_programs(i)
  @compile_these_programs = [i].flatten.compact
end
without_symlinking?() click to toggle source
#

without_symlinking?

#
# File lib/rbt/utility_scripts/compile_into_home_dir.rb, line 85
def without_symlinking?
  commandline_arguments?.any? {|entry|
    entry == :without_symlinking
  }
end