Class: Radiosonde2terraform::Resolver

Inherits:
Object
  • Object
show all
Defined in:
lib/radiosonde2terraform/resolver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options:) ⇒ Resolver

Returns a new instance of Resolver.

Parameters:

  • options (Radiosonde2terraform::Optoins)


8
9
10
# File 'lib/radiosonde2terraform/resolver.rb', line 8

def initialize(options:)
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



11
12
13
# File 'lib/radiosonde2terraform/resolver.rb', line 11

def options
  @options
end

Instance Method Details

#to_tf_conf(filepath) ⇒ String

Returns the generated .tf file.

Parameters:

  • filepath (String)
    • a file path to the DSL

Returns:

  • (String)

    the generated .tf file



15
16
17
18
# File 'lib/radiosonde2terraform/resolver.rb', line 15

def to_tf_conf(filepath)
  alarms = parse_conf(filepath)
  ERB.new(cloudwatch_alarm_template, trim_mode: '-').result(binding)
end