Skip to content

Instantly share code, notes, and snippets.

@jbarnette
Created September 26, 2011 20:45
Show Gist options
  • Save jbarnette/1243346 to your computer and use it in GitHub Desktop.
Save jbarnette/1243346 to your computer and use it in GitHub Desktop.
def bind superclass
klass = Class.new superclass do |c|
def c.name
superclass.name
end
def c.inspect
name
end
end
klass.api = self
klass
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment