class RBT::ColourMakeInstall

Public Class Methods

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

RBT::ColourMakeInstall[]

#
# File lib/rbt/make/colour_make_install.rb, line 87
def self.[](i = '')
  new(i)
end
new( i = nil, run_already = true ) { || ... } click to toggle source
#

initialize

#
# File lib/rbt/make/colour_make_install.rb, line 35
def initialize(
    i           = nil,
    run_already = true,
    &block
  )
  reset
  set_input(i)
  # ======================================================================= #
  # === Handle blocks next
  # ======================================================================= #
  if block_given?
    # ===================================================================== #
    # Merge the given block into the commandline-arguments next:
    # ===================================================================== #
    @hash_commandline_arguments.update(yield)
  end
  run if run_already
end

Public Instance Methods

reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method RBT::LeanPrototype#reset
# File lib/rbt/make/colour_make_install.rb, line 57
def reset
  super()
  # ======================================================================= #
  # === @hash_commandline_arguments
  #
  # The following Hash will store commandline arguments given to this
  # class. I use this rather than yield directly because I feel an
  # instance variable is less transient than depending on block_given?
  # calls primarily.
  # ======================================================================= #
  @hash_commandline_arguments = {
    run_make_install: true,
    run_make:         false
  }
end
run() click to toggle source
#

run (run tag)

#
# File lib/rbt/make/colour_make_install.rb, line 76
def run
  # ======================================================================= #
  # We will not handle anything here but instead simply delegate
  # the block towards class RBT::Make.
  # ======================================================================= #
  RBT::Make.new(@hash_commandline_arguments).run
end