Skip to content

Instantly share code, notes, and snippets.

View npj's full-sized avatar

Peter Brindisi npj

  • SoundCloud
  • Berlin
View GitHub Profile
def ancestors
[self] + (parent ? parent.ancestors : [])
end
class Object
def method_missing(name, *args, &block)
fbomb = [102, 117, 99, 107, 105, 110, 103].inject("") { |s, c| s << c }
if respond_to?(n = name.to_s.gsub(/#{fbomb}_|_#{fbomb}/, ""))
send(n, *args, &block)
else
super(name, *args, &block)
end
end
end