class RBT::Cookbooks::CreateBigYamlCookbook

Constants

NAMESPACE
#

NAMESPACE

#
STORE_INTO_THIS_FILE
#

STORE_INTO_THIS_FILE

#

Public Class Methods

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

[]

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

initialize

#
# File lib/rbt/utility_scripts/create_big_yaml_cookbook.rb, line 38
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/utility_scripts/create_big_yaml_cookbook.rb, line 75
def create_big_yaml_file
  _ = available_programs?
  _.each {|program|
    opnn; e simp(program)
    hash = {}
    dataset = RBT::Cookbooks::Cookbook.return_array(program) { :bypass_menu }
    hash[program] = dataset
    @hash.update(hash)
  }
  what = YAML.dump(@hash)
  into = STORE_INTO_THIS_FILE
  write_what_into(what, into)
  opnn; e "Storing into `#{sfile(into)}`."
end
input?() click to toggle source
#

input?

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

reset (reset tag)

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

run (run tag)

#
# File lib/rbt/utility_scripts/create_big_yaml_cookbook.rb, line 93
def run
  opnn; e '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/utility_scripts/create_big_yaml_cookbook.rb, line 59
def set_input(i = '')
  i = i.first if i.is_a? Array
  i = i.to_s.dup
  @input = i
end