Class: Kitchen::Terraform::OutputsReader
- Inherits:
-
Object
- Object
- Kitchen::Terraform::OutputsReader
- Defined in:
- lib/kitchen/terraform/outputs_reader.rb
Overview
OutputsReader is the class of objects which read Terraform output variables.
Instance Method Summary collapse
-
#initialize(command_executor:) ⇒ Kitchen::Terraform::OutputsReader
constructor
#initialize prepares a new instance of the class.
-
#read(command:, options:) {|json_outputs| ... } ⇒ self
#read reads the output variables.
Constructor Details
#initialize(command_executor:) ⇒ Kitchen::Terraform::OutputsReader
#initialize prepares a new instance of the class.
41 42 43 44 |
# File 'lib/kitchen/terraform/outputs_reader.rb', line 41 def initialize(command_executor:) self.command_executor = command_executor self.no_outputs_defined = /no\\ outputs\\ defined/ end |
Instance Method Details
#read(command:, options:) {|json_outputs| ... } ⇒ self
#read reads the output variables.
29 30 31 32 33 34 35 |
# File 'lib/kitchen/terraform/outputs_reader.rb', line 29 def read(command:, options:) run command: command, options: do |json_outputs:| yield json_outputs: json_outputs end self end |