Sha256: 359c94025b5235538fa0327b6a2f6a3b9df8d7ac2c7d5f7aaba24d06ddf6902c
Contents?: true
Size: 860 Bytes
Versions: 11
Compression:
Stored size: 860 Bytes
Contents
module RBatch # @private class Journal @@def_vars def Journal.def_vars=(a) ; @@def_vars=a ; end attr :journals,:journal_verbose,:user_logs def initialize(verbose=nil) if ! verbose.nil? @journal_verbose = verbose else @journal_verbose = @@def_vars[:rbatch_journal_level] end @journals = [] @user_logs = [] end def put(level,str) if level <= @journal_verbose @journals << str str = "[RBatch] " + str puts str @user_logs.each do |log| if @@def_vars[:mix_rbatch_journal_to_logs] log.journal(str) end end end end def add_log(log) @user_logs << log if @@def_vars[:mix_rbatch_journal_to_logs] @journals.each do |j| log.journal(j) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems