我该如何在HAML中为一个Ruby语句使用多行?比如,我想写出下面这样的代码:
- entries = [{
- :title => "The Fellowship of the Ring",
- :body => "We should walk instead of fly"
- }]
!!! 5
%html
%head
%title Blog
%body
#content
- entries.each do |entry|
.entry
%h3.title= entry[:title]
%p.body= entry[:body]
但是,当然前四行会产生语法错误。