Top Level Namespace
Defined Under Namespace
Modules: Middleman Classes: Entry, FastImage
Instance Method Summary collapse
Instance Method Details
#partial(template, *args) ⇒ Object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/middleman/features/partials.rb', line 1 def partial(template, *args) = args.last.is_a?(Hash) ? args.pop : { } .merge!(:layout => false) if collection = .delete(:collection) then haml_concat(collection.inject([]) do |buffer, member| buffer << haml(template, .merge( :layout => false, :locals => {template.to_sym => member} ) ) end.join("\n")) else haml_concat(haml(template, )) end end |