Class: Terraspace::Compiler::Dsl::Mod

Inherits:
Base
  • Object
show all
Includes:
Syntax::Mod, HelperExtender
Defined in:
lib/terraspace/compiler/dsl/mod.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #structure

Instance Method Summary collapse

Methods included from Util::Logging

#logger

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Terraspace::Compiler::Dsl::Base

Instance Method Details

#buildObject



6
7
8
9
10
# File 'lib/terraspace/compiler/dsl/mod.rb', line 6

def build
  extend_module_level_helpers
  evaluate
  build_content
end

#build_contentObject



16
17
18
19
# File 'lib/terraspace/compiler/dsl/mod.rb', line 16

def build_content
  result = @structure.deep_stringify_keys
  JSON.pretty_generate(result)
end

#evaluateObject



12
13
14
# File 'lib/terraspace/compiler/dsl/mod.rb', line 12

def evaluate
  evaluate_file(@src_path)
end