class RBT::CreateLogFile
Public Class Methods
[](i = ARGV)
click to toggle source
new( commandline_arguments = nil, run_already = true ) { || ... }
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
# File lib/rbt/logging/create_log_file.rb, line 28 def initialize( commandline_arguments = nil, run_already = true ) reset set_commandline_arguments( commandline_arguments ) # ======================================================================= # # === Handle blocks next # ======================================================================= # if block_given? yielded = yield parse_this_input(yielded) end run if run_already end
Public Instance Methods
clear_the_main_hash()
click to toggle source
do_store_into_the_appdir(store_here)
click to toggle source
parse_this_input(i)
click to toggle source
#¶ ↑
parse_this_input
¶ ↑
#¶ ↑
# File lib/rbt/logging/create_log_file.rb, line 115 def parse_this_input(i) if i.is_a? Hash # ===================================================================== # # === :clear_the_main_hash # ===================================================================== # if i.has_key? :clear_the_main_hash clear_the_main_hash if (i.delete(:clear_the_main_hash) == true) end # ===================================================================== # # === :use_environment_flags # ===================================================================== # if i.has_key? :use_environment_flags @hash[:use_environment_flags] = i.delete(:use_environment_flags) end # ===================================================================== # # === :program_name # ===================================================================== # if i.has_key? :program_name @hash[:program_name] = i.delete(:program_name) end # ===================================================================== # # === :uses_appdir_prefix # ===================================================================== # if i.has_key? :uses_appdir_prefix @hash[:uses_appdir_prefix] = i.delete(:uses_appdir_prefix) end # ===================================================================== # # === :store_where # ===================================================================== # if i.has_key? :store_where @hash[:store_where] = i.delete(:store_where) end end end
program_name?()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
Calls superclass method
RBT::LeanPrototype#reset
# File lib/rbt/logging/create_log_file.rb, line 49 def reset super() infer_the_namespace # ======================================================================= # # === @hash # ======================================================================= # @hash = {} # ======================================================================= # # === :installation_was_a_success_or_failure # # Populate the hash with some dummy-variables on startup: # ======================================================================= # @hash[:installation_was_a_success_or_failure] = :failure # ======================================================================= # # === :program_name # ======================================================================= # @hash[:program_name] = :foobar # ======================================================================= # # === :full_configure_command # ======================================================================= # @hash[:full_configure_command] = '../configure --prefix=/usr' # ======================================================================= # # === :store_where # ======================================================================= # @hash[:store_where] = "#{program_name?}.yml" # ======================================================================= # # === :uses_appdir_prefix # ======================================================================= # @hash[:uses_appdir_prefix] = false # ======================================================================= # # === :use_environment_flags # ======================================================================= # @hash[:use_environment_flags] = false end
return_the_dataset_for_the_environment()
click to toggle source
run()
click to toggle source
set_program_name(i)
click to toggle source
store_file( store_where = store_where? )
click to toggle source
#¶ ↑
store_file
¶ ↑
#¶ ↑
# File lib/rbt/logging/create_log_file.rb, line 160 def store_file( store_where = store_where? ) _ = @hash opne "#{rev}Storing into the file `#{sfile(store_where)}#{rev}`." # ======================================================================= # # Handle environment-flags part first: # ======================================================================= # if _.has_key?(:use_environment_flags) and (_.delete(:use_environment_flags) == true) #_.delete(:use_environment_flags) write_what_into(return_the_dataset_for_the_environment, store_where) else _ = YAML.dump(_) write_what_into(_, store_where) end end
store_where?()
click to toggle source