Sha256: 283503338626065e3e0c3180555fbfdadf0cae11cb954a36793287e3b9d6eb2e
Contents?: true
Size: 632 Bytes
Versions: 8
Compression:
Stored size: 632 Bytes
Contents
require 'cgi' module Precious module Views class Layout < Mustache include Rack::Utils alias_method :h, :escape_html attr_reader :name, :path def escaped_name CGI.escape(@name) end def title "Home" end def has_path !@path.nil? end def page_dir @page_dir end def base_url @base_url end def custom_path "#{@base_url}#{@page_dir.empty? ? '' : '/'}#{@page_dir}" end def css # custom css @css end def js # custom js @js end end end end
Version data entries
8 entries across 8 versions & 2 rubygems