You do multi-line Ruby the same way you do multi-line javascript or css:
:ruby
# ruby code goes here
:css
body { of-css: styles; }
:javascript
alert('and JS here');
":something" defines a language filter in Haml, and it reads the whole indented block through that filter, and sometimes wraps it in a tag (:css and :javascript get free %style and %script tags). Also available are :plain, :sass, :textile, :markdown, etc. http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#fi...
Comments
You do multi-line Ruby the same way you do multi-line javascript or css:
":something" defines a language filter in Haml, and it reads the whole indented block through that filter, and sometimes wraps it in a tag (:css and :javascript get free %style and %script tags). Also available are :plain, :sass, :textile, :markdown, etc. http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#fi...Or, if you're a bit masochistic, you can use the multiline character: "|" http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#mu...