Class: StackMaster::TemplateCompilers::SparkleFormation

Inherits:
Object
  • Object
show all
Defined in:
lib/stack_master/template_compilers/sparkle_formation.rb

Class Method Summary collapse

Class Method Details

.compile(template_file_path, compiler_options = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/stack_master/template_compilers/sparkle_formation.rb', line 8

def self.compile(template_file_path, compiler_options = {})
  if compiler_options["sparkle_path"]
    ::SparkleFormation.sparkle_path = File.expand_path(compiler_options["sparkle_path"])
  else
    ::SparkleFormation.sparkle_path = File.dirname(template_file_path)
  end

  JSON.pretty_generate(::SparkleFormation.compile(template_file_path))
end

.require_dependenciesObject



3
4
5
6
# File 'lib/stack_master/template_compilers/sparkle_formation.rb', line 3

def self.require_dependencies
  require 'sparkle_formation'
  require 'stack_master/sparkle_formation/template_file'
end