class Stackr::Template
Attributes
capabilities[RW]
includes_path[RW]
name[RW]
parameter_map[RW]
template_dsl[RW]
url[RW]
Public Class Methods
load(template_file)
click to toggle source
eval the contents in the context of this class
# File lib/stackr/template.rb, line 18 def self.load(template_file) return nil if !File.exist?(template_file) eval File.read(template_file) end
new()
click to toggle source
# File lib/stackr/template.rb, line 11 def initialize @capabilities = [] @parameter_map = {} @includes_path = 'includes' end
Public Instance Methods
body()
click to toggle source
# File lib/stackr/template.rb, line 27 def body if @body.nil? @body = generate() end @body end
generate()
click to toggle source
# File lib/stackr/template.rb, line 23 def generate JSON.pretty_generate(template_dsl) end