Top Level Namespace

Defined Under Namespace

Modules: Pangea

Instance Method Summary collapse

Instance Method Details

#render(data) ⇒ Object

external entities call render with data render implements the synthesizer and processes internal module with data



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/pangea-component-dns.rb', line 14

def render(data)
  synth = TerraformSynthesizer.new
  current_file_directory = File.dirname(File.expand_path(__FILE__))
  vpc_file_path = File.join(
    current_file_directory,
    '../',
    'resources',
    'dns.rb'
  )
  vpc_content = File.read(vpc_file_path)
  synth.load_synthesis_data(data)
  synth.synthesize(vpc_content)
  synth.synthesis
end

#symbolize(hash) ⇒ Object



4
5
6
# File 'lib/pangea-component-dns.rb', line 4

def symbolize(hash)
  JSON[JSON[hash], symbolize_names: true]
end