Skip to content

Instantly share code, notes, and snippets.

@jaredatron
Created April 24, 2009 18:30
Show Gist options
  • Select an option

  • Save jaredatron/101266 to your computer and use it in GitHub Desktop.

Select an option

Save jaredatron/101266 to your computer and use it in GitHub Desktop.
class Object
define_method :not do
Not.new(self)
end
class Not
private *instance_methods.select { |m| m !~ /(^__|^\W|^binding$)/ }
def initialize(subject)
@subject = subject
end
def method_missing(sym, *args, &blk)
[email protected](sym,*args,&blk)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment