module Ki::Helpers
Public Instance Methods
css(url)
click to toggle source
# File lib/ki/helpers.rb, line 7 def css(url) haml "%link{:href => '#{url}', :rel => 'stylesheet'}" end
haml(s)
click to toggle source
# File lib/ki/helpers.rb, line 15 def haml(s) Haml::Engine.new(s).render end
js(url)
click to toggle source
# File lib/ki/helpers.rb, line 11 def js(url) haml "%script{:src => '#{url}'}" end
partial(s)
click to toggle source
# File lib/ki/helpers.rb, line 19 def partial(s) path = view_path(s) raise PartialNotFoundError, path unless File.file?(path) haml(File.read(path)) end