Skip to content

Instantly share code, notes, and snippets.

@collin
Created October 6, 2008 21:00
Show Gist options
  • Save collin/15143 to your computer and use it in GitHub Desktop.
Save collin/15143 to your computer and use it in GitHub Desktop.
,to_haml: function() {
var _this = _(this)
,attrs = _this.children();
if(!attrs.length) return '';
return '{'
+ attrs.map(function(){
var __this = _(this)
return '"'
+ __this.find('dt').text()
+ '" => '
+ __this.find('dd').text()
}).join(', ')
+'}'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment