Class: Kitchen::Pulumi::FilePathConfigAttributeDefiner

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

Overview

Class for defining config attributes that are consumed as file paths

Instance Method Summary collapse

Constructor Details

#initialize(attribute:, schema:) ⇒ FilePathConfigAttributeDefiner

Returns a new instance of FilePathConfigAttributeDefiner.


10
11
12
13
14
15
16
# File 'lib/kitchen/pulumi/file_path_config_attribute_definer.rb', line 10

def initialize(attribute:, schema:)
  @attribute = attribute
  @definer = ConfigAttributeDefiner.new(
    attribute: attribute,
    schema: schema,
  )
end

Instance Method Details

#define(plugin_class: plugin) ⇒ Object

Defines the config attribute and then expands the file path


19
20
21
22
# File 'lib/kitchen/pulumi/file_path_config_attribute_definer.rb', line 19

def define(plugin_class: plugin)
  @definer.define(plugin_class: plugin_class)
  plugin_class.expand_path_for(@attribute.to_sym)
end