class Boxlet::Templates

Public Class Methods

method_missing(method, *arguments, &block) click to toggle source
# File lib/boxlet/app/templates.rb, line 3
def self.method_missing(method, *arguments, &block)
  filename = "#{File.dirname(__FILE__)}/views/#{method}.html"
  if File.exist?(filename)
    File.open(filename).read
  else
    raise "Template file not found for #{method}"
  end
end