class RBT::Action::Cookbooks::ExpandedCookbook

Public Class Methods

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

RBT::Action::Cookbooks::ExpandedCookbook[]

#
# File lib/rbt/actions/individual_actions/cookbooks/expanded_cookbook/expanded_cookbook.rb, line 94
def self.[](i = ARGV)
  new(i)
end
new( i = ARGV, run_already = true ) { || ... } click to toggle source
#

initialize

#
# File lib/rbt/actions/individual_actions/cookbooks/expanded_cookbook/expanded_cookbook.rb, line 32
def initialize(
    i           = ARGV,
    run_already = true,
    &block
  )
  reset
  set_commandline_arguments(i)
  case run_already
  # ======================================================================= #
  # === :do_not_run_yet
  # ======================================================================= #
  when :do_not_run_yet
    run_already = false
  end
  # ======================================================================= #
  # === Handle blocks given to this class next
  # ======================================================================= #
  if block_given?
    _yielded = yield
  end
  run if run_already
end

Public Instance Methods

dataset?() click to toggle source
#

dataset?

#
# File lib/rbt/actions/individual_actions/cookbooks/expanded_cookbook/expanded_cookbook.rb, line 73
def dataset?
  @internal_hash[:dataset]
end
program_path?() click to toggle source
#

program_path?

#
# File lib/rbt/actions/individual_actions/cookbooks/expanded_cookbook/expanded_cookbook.rb, line 66
def program_path?
  @internal_hash[:dataset]['program_path']
end
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method RBT::Action#reset
# File lib/rbt/actions/individual_actions/cookbooks/expanded_cookbook/expanded_cookbook.rb, line 58
def reset
  super()
  infer_the_namespace
end
run() click to toggle source
#

run (run tag)

#
# File lib/rbt/actions/individual_actions/cookbooks/expanded_cookbook/expanded_cookbook.rb, line 80
def run
  # ======================================================================= #
  # === :dataset
  #
  # We load the dataset from an already existing .yml file next. Naturally
  # this will only work if the .yml file exists, and has the desired
  # dataset, as-is.
  # ======================================================================= #
  @internal_hash[:dataset] = load_dataset_from_this_expanded_cookbook(first_argument?)
end