Skip to content

Instantly share code, notes, and snippets.

View turlockmike's full-sized avatar

Mike D turlockmike

View GitHub Profile
@turlockmike
turlockmike / hash.rb
Created September 10, 2014 19:20
Transform Values in a nested hash
class Hash
def self.transform_values(node,&block)
if node.class == Hash
Hash[node.map{|k,v| [k,Hash.transform_values(v, &block)]}]
else
block.call(node)
end
end
def transform_values(&block)
FB.Event.subscribe("auth.authResponseChange", function(response) {
Octane.facebookAuthStatusUpdate(response.status);
});
FB.getLoginStatus(function(response) {
Octane.facebookAuthStatusUpdate(response.status);
})