Skip to content

Instantly share code, notes, and snippets.

@samwgoldman
Created March 13, 2011 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samwgoldman/868311 to your computer and use it in GitHub Desktop.
Save samwgoldman/868311 to your computer and use it in GitHub Desktop.
class Hash
def each_recursive(&block)
self.each do |k, v|
yield k, v
v.each_recursive(&block) if v.is_a?(Hash)
end
end
def each_key_recursive(&block)
self.each_recursive { |k, _| yield k }
end
def to_xml(options = {})
logger.info "Does not show up in log."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment