Class: Kitchen::Terraform::FilePathConfigAttributeDefiner

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/terraform/file_path_config_attribute_definer.rb

Overview

FilePathConfigAttributeDefiner is the class of objects which define a file path configuration attribute on a plugin class.

Instance Method Summary collapse

Constructor Details

#initialize(attribute:, schema:) ⇒ Kitchen::Terraform::FilePathConfigAttributeDefiner

#initialize prepares a new instance of the class.



41
42
43
44
# File 'lib/kitchen/terraform/file_path_config_attribute_definer.rb', line 41

def initialize(attribute:, schema:)
  self.attribute = attribute
  self.definer = ::Kitchen::Terraform::ConfigAttributeDefiner.new attribute: attribute, schema: schema
end

Instance Method Details

#define(plugin_class:) ⇒ self

#define defines the file path configuration attribute on a plugin class.



29
30
31
32
33
34
# File 'lib/kitchen/terraform/file_path_config_attribute_definer.rb', line 29

def define(plugin_class:)
  definer.define plugin_class: plugin_class
  plugin_class.expand_path_for attribute.to_sym

  self
end