class Construqt::Templates
Public Class Methods
new(region)
click to toggle source
# File lib/construqt/templates.rb, line 4 def initialize(region) @region = region @templates = {} end
Public Instance Methods
add(name, cfg)
click to toggle source
# File lib/construqt/templates.rb, line 46 def add(name, cfg) throw "template with name #{name} exists" if @templates[name] cfg['name'] = name ret = Template.new(cfg) @templates[name] = ret ret end
find(name)
click to toggle source
# File lib/construqt/templates.rb, line 40 def find(name) ret = @templates[name] throw "template with name #{name} not found" unless @templates[name] ret end