Class: CommandBase
- Inherits:
-
Object
- Object
- CommandBase
- Defined in:
- lib/setup_oob/command/base.rb
Overview
The base class for a command
Direct Known Subclasses
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
- #converge! ⇒ Object
- #converged? ⇒ Boolean
-
#initialize(host, logger, data) ⇒ CommandBase
constructor
A new instance of CommandBase.
Constructor Details
#initialize(host, logger, data) ⇒ CommandBase
Returns a new instance of CommandBase.
21 22 23 24 25 26 |
# File 'lib/setup_oob/command/base.rb', line 21 def initialize(host, logger, data) @host = host @logger = logger # data is any extra data subcommands might need @data = data end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
19 20 21 |
# File 'lib/setup_oob/command/base.rb', line 19 def logger @logger end |
Instance Method Details
#converge! ⇒ Object
34 35 36 37 |
# File 'lib/setup_oob/command/base.rb', line 34 def converge! logger.info("Validating #{pretty_self}") _converge! end |
#converged? ⇒ Boolean
28 29 30 31 32 |
# File 'lib/setup_oob/command/base.rb', line 28 def converged? converged = _converged? logger.info("#{pretty_self}: converged: #{converged}") converged end |