Skip to content

Instantly share code, notes, and snippets.

@adamgibbins
Created July 23, 2012 19:30
Show Gist options
  • Save adamgibbins/3165680 to your computer and use it in GitHub Desktop.
Save adamgibbins/3165680 to your computer and use it in GitHub Desktop.
<%=
yaml = ["---"]
keys = scope.to_hash.keys.reject {|k| k.to_s =~ /(^uptime|^memoryfree$|^swapfree$|^_timestamp$|^path$|^users$)/}
keys.sort.each {|k| yaml << "#{k}: #{scope.lookupvar(k).to_s}"}
yaml.join("\n ")
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment