Methods

Class Index [+]

Quicksearch

Ramaze::View::Haml

View adapter that allows views to use Haml, for more information see the following website: haml-lang.com/

Public Class Methods

call(action, string) click to toggle source
    # File lib/ramaze/view/haml.rb, line 15
15:       def self.call(action, string)
16:         options = action.options
17: 
18:         if haml_options = action.instance.ancestral_trait[:haml_options]
19:           options = options.merge(haml_options)
20:         end
21: 
22:         action.options[:filename] = (action.view || '(haml)')
23:         haml = View.compile(string){|s| ::Haml::Engine.new(s, options) }
24:         html = haml.to_html(action.instance, action.variables)
25: 
26:         return html, 'text/html'
27:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.