class RBT::GenerateRbtConfiguration
Constants
- LAST_UPDATE
#¶ ↑
LAST_UPDATE
¶ ↑#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
- SAVE_NEW_FILE_HERE
#¶ ↑
SAVE_NEW_FILE_HERE
¶ ↑#¶ ↑
- STORE_WHERE_BASE_DIR
#¶ ↑
STORE_WHERE_BASE_DIR
¶ ↑#¶ ↑
Public Class Methods
Public Instance Methods
add(i)
click to toggle source
#¶ ↑
add¶ ↑
This will append to @_ and will also append two newlines.
#¶ ↑
# File lib/rbt/utility_scripts/generate_rbt_configuration.rb, line 73 def add(i) @_ << i+N end
Also aliased as: _
e_get_user_input_then_add(variable_name, desc = '')
click to toggle source
#¶ ↑
e_get_user_input_then_add
¶ ↑
Here we will combine get_user_input
() with add().
#¶ ↑
# File lib/rbt/utility_scripts/generate_rbt_configuration.rb, line 116 def e_get_user_input_then_add(variable_name, desc = '') desc = "Description: #{variable_name}" if desc.to_s.empty? print desc+' ' get_user_input add ' '+variable_name+': '+@user_input end
get_user_input()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/generate_rbt_configuration.rb, line 141 def run show_welcome_message opnn; e 'We will now generate a new configuration file.' opnn; e 'We will store this configuration file here: '+sfile(@store_here) opnn; e 'We will guide you through the process of creating a' opnn; e 'new configuration file from scratch.' show_last_update run_through_all_configure_options save_result # store it into a new file. end
run_through_all_configure_options()
click to toggle source
#¶ ↑
run_through_all_configure_options
¶ ↑
Here we will grab all configuration entries.
#¶ ↑
# File lib/rbt/utility_scripts/generate_rbt_configuration.rb, line 98 def run_through_all_configure_options _ = RBT.config_directory? # ========================================================================== # # Load it up next. # ========================================================================== # available_keys = Dir[_+'*.yml'].map {|entry| File.basename(entry).gsub!(/\.yml$/,'') } available_keys.each {|entry| _ entry+': t' } end
save_result()
click to toggle source
set_store_here(i)
click to toggle source
show_last_update()
click to toggle source