Class: Terraspace::Terraform::Args::Custom
- Inherits:
-
Object
- Object
- Terraspace::Terraform::Args::Custom
- Extended by:
- Memoist
- Includes:
- DslEvaluator, Dsl
- Defined in:
- lib/terraspace/terraform/args/custom.rb
Constant Summary
Constants included from Shorthands
Shorthands::COMMANDS_WITH_INPUT, Shorthands::COMMANDS_WITH_LOCKING, Shorthands::COMMANDS_WITH_PARALLELISM, Shorthands::COMMANDS_WITH_VARS
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #args ⇒ Object
- #build ⇒ Object
- #env_vars ⇒ Object
-
#initialize(mod, name) ⇒ Custom
constructor
A new instance of Custom.
Methods included from Dsl
#command, #each_command, #shorthand?, #shorthand_commands
Methods included from Shorthands
Constructor Details
#initialize(mod, name) ⇒ Custom
Returns a new instance of Custom.
8 9 10 11 |
# File 'lib/terraspace/terraform/args/custom.rb', line 8 def initialize(mod, name) @mod, @name = mod, name @commands = {} end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/terraspace/terraform/args/custom.rb', line 7 def name @name end |
Instance Method Details
#args ⇒ Object
20 21 22 |
# File 'lib/terraspace/terraform/args/custom.rb', line 20 def args terraform_args + var_file_args end |
#build ⇒ Object
13 14 15 16 17 |
# File 'lib/terraspace/terraform/args/custom.rb', line 13 def build evaluate_file("#{Terraspace.root}/config/args/terraform.rb") evaluate_file("#{@mod.root}/config/args/terraform.rb") @commands.deep_stringify_keys! end |
#env_vars ⇒ Object
24 25 26 27 |
# File 'lib/terraspace/terraform/args/custom.rb', line 24 def env_vars build dig("env", {}) end |