Module: Kitchen::Terraform::ConfigAttribute::Color Abstract
- Extended by:
- Kitchen::Terraform::ConfigAttributeCacher
- Included in:
- Driver::Terraform, Verifier::Terraform
- Defined in:
- lib/kitchen/terraform/config_attribute/color.rb
Overview
This module is abstract.
It must be included by plugin class in order to be used.
The :color configuration attribute is an optional boolean which toggles colored output from the Terraform Client commands.
Class Method Summary collapse
-
.included(plugin_class) ⇒ void
A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
-
.to_sym ⇒ ::Symbol
The symbol corresponding to the attribute.
Instance Method Summary collapse
-
#config_color_default_value ⇒ Boolean
The default value depends on the presence of a terminal device associated with the Test Kitchen process.
Methods included from Kitchen::Terraform::ConfigAttributeCacher
Class Method Details
.included(plugin_class) ⇒ void
This method returns an undefined value.
A callback to define the configuration attribute which is invoked when this module is included in a plugin class.
33 34 35 36 37 38 39 40 |
# File 'lib/kitchen/terraform/config_attribute/color.rb', line 33 def self.included(plugin_class) ::Kitchen::Terraform::ConfigAttributeDefiner .new( attribute: self, schema: ::Kitchen::Terraform::ConfigSchemas::Boolean ) .define plugin_class: plugin_class end |
.to_sym ⇒ ::Symbol
Returns the symbol corresponding to the attribute.
43 44 45 |
# File 'lib/kitchen/terraform/config_attribute/color.rb', line 43 def self.to_sym :color end |
Instance Method Details
#config_color_default_value ⇒ Boolean
The default value depends on the presence of a terminal device associated with the Test Kitchen process.
53 54 55 |
# File 'lib/kitchen/terraform/config_attribute/color.rb', line 53 def config_color_default_value ::Kitchen.tty? end |