Skip to content

Instantly share code, notes, and snippets.

@jballanc
Created June 25, 2012 07:41
Show Gist options
  • Save jballanc/2987184 to your computer and use it in GitHub Desktop.
Save jballanc/2987184 to your computer and use it in GitHub Desktop.
If this isn't multiple inheritance, then what is?
module A
def report
puts "reporting from A"
end
end
class B
def report
puts "reporting from B"
end
end
class C < B
def report
puts "calling super from C"
super
end
end
C.new.report
C.send(:include, A).new.report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment