class Frozen::Template::View
Attributes
layout_path[RW]
options[RW]
Public Class Methods
new(options={})
click to toggle source
# File lib/frozen/template/view.rb, line 11 def initialize(options={}) end
Public Instance Methods
build_extension()
click to toggle source
# File lib/frozen/template/view.rb, line 18 def build_extension ".html" end
build_path()
click to toggle source
# File lib/frozen/template/view.rb, line 22 def build_path "" end
contents()
click to toggle source
# File lib/frozen/template/view.rb, line 14 def contents read_from_file(file_path) end
get_layout_path()
click to toggle source
# File lib/frozen/template/view.rb, line 31 def get_layout_path File.join(layout_path, "default.html.slim") end
layout()
click to toggle source
# File lib/frozen/template/view.rb, line 35 def layout Slim::Template.new {File.read(get_layout_path)} end
render()
click to toggle source
# File lib/frozen/template/view.rb, line 26 def render env = Frozen::Environment::Base.new(self) layout.render(env) { Slim::Template.new { contents }.render(env) } end