Created
March 13, 2011 18:32
-
-
Save samwgoldman/868311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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