Class: Terraspace::Terraform::Args::Expand
- Inherits:
-
Object
- Object
- Terraspace::Terraform::Args::Expand
- Defined in:
- lib/terraspace/terraform/args/expand.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(mod, options = {}) ⇒ Expand
constructor
A new instance of Expand.
Constructor Details
#initialize(mod, options = {}) ⇒ Expand
Returns a new instance of Expand.
19 20 21 |
# File 'lib/terraspace/terraform/args/expand.rb', line 19 def initialize(mod, ={}) @mod, @options = mod, end |
Class Method Details
.option_method(*names) ⇒ Object
4 5 6 7 8 |
# File 'lib/terraspace/terraform/args/expand.rb', line 4 def option_method(*names) names.compact.each do |name| option_method_each(name) end end |
.option_method_each(name) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/terraspace/terraform/args/expand.rb', line 10 def option_method_each(name) define_method name do return unless @options[name] = Terraspace::Compiler::Expander.autodetect(@mod) .expansion(@options[name]) # pattern is a String that contains placeholders for substitutions end end |