Class: Tempster::Messager
Instance Method Summary collapse
-
#initialize(verbose, callback = nil, prefix = "") ⇒ Messager
constructor
A new instance of Messager.
- #puts(message) ⇒ Object
Constructor Details
#initialize(verbose, callback = nil, prefix = "") ⇒ Messager
Returns a new instance of Messager.
172 173 174 175 176 |
# File 'lib/tempster.rb', line 172 def initialize(verbose, callback=nil, prefix="") @verbose = verbose @callback = callback @prefix = prefix end |
Instance Method Details
#puts(message) ⇒ Object
178 179 180 181 182 183 184 185 186 |
# File 'lib/tempster.rb', line 178 def puts() if @callback @callback.call(@prefix+) else if @verbose STDOUT.puts @prefix+ end end end |