lib/rspec/terraform/helpers/var.rb in rspec-terraform-0.1.0.pre.30 vs lib/rspec/terraform/helpers/var.rb in rspec-terraform-0.1.0.pre.31
- old
+ new
@@ -4,18 +4,17 @@
module RSpec
module Terraform
module Helpers
class Var
- attr_reader(:overrides, :configuration_provider)
+ attr_reader(:configuration_provider)
- def initialize(overrides = {}, configuration_provider = nil)
- @overrides = overrides
+ def initialize(opts = {})
@configuration_provider =
- configuration_provider || Configuration.identity_provider
+ opts[:configuration_provider] || Configuration.identity_provider
end
- def execute(&block)
+ def execute(overrides = {}, &block)
parameters = with_configuration_provider_parameters(overrides)
parameters = with_resolved_vars(parameters, &block)
parameters[:vars][parameters[:name].to_sym]
end