Class: Terraspace::Terraform::Api::Vars::Rb
- Includes:
- DslEvaluator
- Defined in:
- lib/terraspace/terraform/api/vars/rb.rb
Instance Method Summary collapse
-
#initialize ⇒ Rb
constructor
A new instance of Rb.
- #var(attrs = {}) ⇒ Object
- #vars ⇒ Object
Methods included from Util::Logging
Methods included from Http::Concern
Constructor Details
#initialize ⇒ Rb
Returns a new instance of Rb.
5 6 7 8 |
# File 'lib/terraspace/terraform/api/vars/rb.rb', line 5 def initialize(*) super @vars = [] # holds results end |
Instance Method Details
#var(attrs = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/terraspace/terraform/api/vars/rb.rb', line 15 def var(attrs={}) default = { category: "terraform" } # required field var = default.deep_merge(attrs).deep_stringify_keys! @vars << var end |
#vars ⇒ Object
10 11 12 13 |
# File 'lib/terraspace/terraform/api/vars/rb.rb', line 10 def vars evaluate_file(@vars_path) @vars end |