class RBT::Cookbooks::CreateBigYamlCookbook

Constants

STORE_INTO_THIS_FILE
#

STORE_INTO_THIS_FILE

#

Public Class Methods

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

RBT::Cookbooks::CreateBigYamlCookbook[]

#
# File lib/rbt/generate_files/create_big_yaml_cookbook.rb, line 103
def self.[](i = '')
  new(i)
end
new( i = nil, run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/generate_files/create_big_yaml_cookbook.rb, line 37
def initialize(
    i           = nil,
    run_already = true
  )
  reset
  set_input(i)
  run if run_already
end

Public Instance Methods

create_big_yaml_file() click to toggle source
#

create_big_yaml_file

#
# File lib/rbt/generate_files/create_big_yaml_cookbook.rb, line 77
def create_big_yaml_file
  _ = available_programs?
  _.each {|program|
    opne simp(program)
    hash = {}
    dataset = action(:SanitizeCookbook).return_array(program)
    hash[program] = dataset
    @hash.update(hash)
  }
  what = YAML.dump(@hash)
  into = STORE_INTO_THIS_FILE
  write_what_into(what, into)
  opne "Storing into `#{sfile(into)}`."
end
input?() click to toggle source
#

input?

#
# File lib/rbt/generate_files/create_big_yaml_cookbook.rb, line 70
def input?
  @input
end
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method RBT::LeanPrototype#reset
# File lib/rbt/generate_files/create_big_yaml_cookbook.rb, line 49
def reset
  super()
  infer_the_namespace
  # ======================================================================= #
  # === @hash
  # ======================================================================= #
  @hash = {} # This is the main Hash.
end
run() click to toggle source
#

run (run tag)

#
# File lib/rbt/generate_files/create_big_yaml_cookbook.rb, line 95
def run
  opne 'Now creating a big yaml file. This will take some time.'
  create_big_yaml_file
end
set_input(i = '') click to toggle source
#

set_input

#
# File lib/rbt/generate_files/create_big_yaml_cookbook.rb, line 61
def set_input(i = '')
  i = i.first if i.is_a? Array
  i = i.to_s.dup
  @input = i
end