Skip to content

Instantly share code, notes, and snippets.

@aub
Created May 29, 2009 20:11
Show Gist options
  • Save aub/120180 to your computer and use it in GitHub Desktop.
Save aub/120180 to your computer and use it in GitHub Desktop.
class Base
def self.some_method
puts 'Some method!'
end
def self.inherited(subclass)
puts 'Inherited!'
end
end
class Sub < Base
some_method
end
Class.new(Base) do
some_method
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment