class Egg::Templates
Aids in the loading of template files bundled in the gem.
Public Class Methods
[](filename)
click to toggle source
# File lib/egg/templates.rb, line 10 def self.[](filename) template_path = Egg.root_join("..", "templates", filename) raise(TemplateNotFoundError, "No #{filename}") unless File.exist?(template_path) ERB.new(File.read(template_path)) end