Skip to content

Instantly share code, notes, and snippets.

@ciscou
Created June 6, 2013 10:52
Show Gist options
  • Save ciscou/5720724 to your computer and use it in GitHub Desktop.
Save ciscou/5720724 to your computer and use it in GitHub Desktop.
class A
def self.foo ; "foo" ; end
def self.bar ; "bar" ; end
end
class B
def self.foo ; "another foo" ; end
def self.method_missing(method_id, *args, &block)
if A.respond_to?(method_id)
A.send(method_id, *args, &block)
else
super
end
end
end
puts B.foo
puts B.bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment