mixin in ruby
class Parent
def hello
puts "hello from parent"
end
end
module M1
def hello
puts "hello from module 1"
end
end
module M2
def hello
puts "hello from module 2"
super
end
end
class Child < Parent
include M1
include M2
def hello
puts "hello from Child"
super
end
end
Child.new.hello