Class: RubyTerraform::Options::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_terraform/options/factory.rb

Instance Method Summary collapse

Constructor Details

#initialize(definitions) ⇒ Factory

Returns a new instance of Factory.



8
9
10
# File 'lib/ruby_terraform/options/factory.rb', line 8

def initialize(definitions)
  @definitions = definitions
end

Instance Method Details

#resolve(names, parameters) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/ruby_terraform/options/factory.rb', line 12

def resolve(names, parameters)
  names
    .map { |name| Name.new(name) }
    .inject([]) do |options, name|
      options + resolve_name(name, parameters)
    end
end