Module: Haml::Ruby2JS

Includes:
Filters::Base
Defined in:
lib/ruby2js/haml.rb

Instance Method Summary collapse

Instance Method Details

#render(text) ⇒ Object



22
23
24
25
# File 'lib/ruby2js/haml.rb', line 22

def render(text)
  converted = Ruby2JS.convert(text).to_s
  "<script type='text/javascript'>\n#{converted}\n</script>"
end