module Rack::App::FrontEnd::SingletonMethods
Public Instance Methods
helpers(&block)
click to toggle source
# File lib/rack/app/front_end/singleton_methods.rb, line 14 def helpers(&block) @helpers ||= lambda { helpers_module = Module.new helpers_module.__send__(:include, Rack::App::FrontEnd::Helpers) helpers_module.__send__(:extend, Rack::App::FrontEnd::SyntaxSugar::DSL) }.call @helpers.class_eval(&block) unless block.nil? return @helpers end
layout(layout_path=nil)
click to toggle source
# File lib/rack/app/front_end/singleton_methods.rb, line 9 def layout(layout_path=nil) @layout = Rack::App::Utils.expand_path(layout_path) unless layout_path.nil? @layout end
mount_folder(folder_path)
click to toggle source
# File lib/rack/app/front_end/singleton_methods.rb, line 3 def mount_folder(folder_path) Rack::App::FrontEnd::FolderMounter.new(self).mount(Rack::App::Utils.expand_path(folder_path)) end
Also aliased as: mount_templates_from