module Ground::Protocol::Render::Template
Public Instance Methods
erb(file, &p)
click to toggle source
# File lib/ground/protocol/render/template.rb, line 15 def erb(file, &p) template = ERB.new(File.read(File.join(Ground.root, file))) template.result(binding) end
haml(path, &p)
click to toggle source
# File lib/ground/protocol/render/template.rb, line 5 def haml(path, &p) template = Tilt::HamlTemplate.new(File.join(Ground.views, "#{path}.haml")) template.render self, &p end
plain(file, &p)
click to toggle source
# File lib/ground/protocol/render/template.rb, line 20 def plain(file, &p) File.read(File.join(Ground.root, file)) end
slim(path, &p)
click to toggle source
# File lib/ground/protocol/render/template.rb, line 10 def slim(path, &p) template = Slim::Template.new(File.join(Ground.views, "#{path}.slim")) template.render self, &p end