Class: Kitchen::Terraform::Raise::ActionFailed
- Inherits:
-
Object
- Object
- Kitchen::Terraform::Raise::ActionFailed
- Defined in:
- lib/kitchen/terraform/raise/action_failed.rb
Overview
ActionFailed is the class of objects which handle errors resulting in failed actions.
Instance Method Summary collapse
-
#call(message:) ⇒ void
#call logs an error message and raises an error with the message.
-
#initialize(logger:) ⇒ Kitchen::Terraform::ActionFailed
constructor
#initialize prepares a new instance of the class.
Constructor Details
#initialize(logger:) ⇒ Kitchen::Terraform::ActionFailed
#initialize prepares a new instance of the class.
39 40 41 |
# File 'lib/kitchen/terraform/raise/action_failed.rb', line 39 def initialize(logger:) self.logger = logger end |
Instance Method Details
#call(message:) ⇒ void
This method returns an undefined value.
#call logs an error message and raises an error with the message.
29 30 31 32 33 |
# File 'lib/kitchen/terraform/raise/action_failed.rb', line 29 def call(message:) logger.error raise ::Kitchen::ActionFailed, end |