Class: Kitchen::Terraform::ConfigAttributeDefiner
- Inherits:
-
Object
- Object
- Kitchen::Terraform::ConfigAttributeDefiner
- Defined in:
- lib/kitchen/terraform/config_attribute_definer.rb
Overview
Defines a configuration attribute on a plugin class.
Instance Method Summary collapse
-
#define(plugin_class:) ⇒ void
Defines the configuration attribute on a plugin class.
Instance Method Details
#define(plugin_class:) ⇒ void
This method returns an undefined value.
Defines the configuration attribute on a plugin class.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/kitchen/terraform/config_attribute_definer.rb', line 25 def define(plugin_class:) plugin_class .required_config @attribute do |_attribute, value, _plugin| process( messages: @schema .call(value: value) ., plugin_class: plugin_class ) end plugin_class .default_config @attribute do |plugin| plugin.send "config_#{@attribute}_default_value" end end |