Module: Provisioner::Logger
- Defined in:
- lib/provisioner/logger.rb
Class Method Summary collapse
Class Method Details
.disable ⇒ Object
12 13 14 15 16 17 |
# File 'lib/provisioner/logger.rb', line 12 def disable class << self self.send(:define_method, :log, proc { |msg|}) self.send(:define_method, :logging, proc { |msg, &block| block.call }) end end |
.enable ⇒ Object
5 6 7 8 9 10 |
# File 'lib/provisioner/logger.rb', line 5 def enable class << self self.send(:define_method, :log, proc { |msg| _log(msg) }) self.send(:define_method, :logging, proc { |msg, &block| _logging(msg, &block) }) end end |
.log(msg) ⇒ Object
19 20 |
# File 'lib/provisioner/logger.rb', line 19 def log(msg) end |
.logging(msg, &block) ⇒ Object
22 23 24 |
# File 'lib/provisioner/logger.rb', line 22 def logging(msg, &block) block.call end |