Class: Kitchen::Provisioner::Puppet::Librarian::LoggerUI
- Inherits:
-
Librarian::UI
- Object
- Librarian::UI
- Kitchen::Provisioner::Puppet::Librarian::LoggerUI
- Defined in:
- lib/kitchen/provisioner/puppet/librarian.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
writeonly
Sets the attribute logger.
Instance Method Summary collapse
- #confirm(message = nil) ⇒ Object
- #debug(message = nil) ⇒ Object
- #error(message = nil) ⇒ Object
- #info(message = nil) ⇒ Object
-
#initialize(logger) ⇒ LoggerUI
constructor
A new instance of LoggerUI.
- #warn(message = nil) ⇒ Object
Constructor Details
#initialize(logger) ⇒ LoggerUI
Returns a new instance of LoggerUI.
36 37 38 |
# File 'lib/kitchen/provisioner/puppet/librarian.rb', line 36 def initialize(logger) @logger = logger end |
Instance Attribute Details
#logger=(value) ⇒ Object (writeonly)
Sets the attribute logger
34 35 36 |
# File 'lib/kitchen/provisioner/puppet/librarian.rb', line 34 def logger=(value) @logger = value end |
Instance Method Details
#confirm(message = nil) ⇒ Object
56 57 58 |
# File 'lib/kitchen/provisioner/puppet/librarian.rb', line 56 def confirm( = nil) @logger.info( || yield) end |
#debug(message = nil) ⇒ Object
44 45 46 |
# File 'lib/kitchen/provisioner/puppet/librarian.rb', line 44 def debug( = nil) @logger.debug( || yield) end |
#error(message = nil) ⇒ Object
48 49 50 |
# File 'lib/kitchen/provisioner/puppet/librarian.rb', line 48 def error( = nil) @logger.error( || yield) end |
#info(message = nil) ⇒ Object
52 53 54 |
# File 'lib/kitchen/provisioner/puppet/librarian.rb', line 52 def info( = nil) @logger.info( || yield) end |
#warn(message = nil) ⇒ Object
40 41 42 |
# File 'lib/kitchen/provisioner/puppet/librarian.rb', line 40 def warn( = nil) @logger.warn( || yield) end |