Class: Boxlet::Templates
- Inherits:
-
Object
- Object
- Boxlet::Templates
- Defined in:
- lib/boxlet/app/templates.rb
Class Method Summary collapse
Class Method Details
.method_missing(method, *arguments, &block) ⇒ Object
3 4 5 6 7 8 9 10 |
# 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 |