Class: Bosh::Deployer::UiMessager
- Inherits:
-
Object
- Object
- Bosh::Deployer::UiMessager
- Includes:
- BoshExtensions
- Defined in:
- lib/bosh/deployer/ui_messager.rb
Defined Under Namespace
Classes: UnknownMessageName
Class Method Summary collapse
Instance Method Summary collapse
- #info(message_name) ⇒ Object
-
#initialize(messages, options = {}) ⇒ UiMessager
constructor
A new instance of UiMessager.
Constructor Details
#initialize(messages, options = {}) ⇒ UiMessager
Returns a new instance of UiMessager.
20 21 22 23 |
# File 'lib/bosh/deployer/ui_messager.rb', line 20 def initialize(, = {}) @messages = @options = end |
Class Method Details
.for_deployer(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bosh/deployer/ui_messager.rb', line 9 def self.for_deployer( = {}) new( { update_stemcell_unknown: 'Will deploy because new stemcell fingerprint is unknown', update_stemcell_changed: 'Will deploy due to stemcell changes', update_config_changed: 'Will deploy due to configuration changes', update_no_changes: 'Will skip deploy due to no changes', }, ) end |
Instance Method Details
#info(message_name) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/bosh/deployer/ui_messager.rb', line 25 def info() raise ArgumentError, 'message_name must be a Symbol' unless .is_a?(Symbol) = @messages[] if say() unless @options[:silent] else raise UnknownMessageName, end end |