#!/usr/bin/env ruby -w

module Mixin
def method_missing(meth, *args, &block)
if meth.to_s =~ /\Ato_.+/
"Mixin"
else
super
end
end
end

class Test
include Mixin
def method_missing(meth, *args, &block)
if meth.to_s =~ /\Ato_class_.+/
"Class"
else
super
end
end
end

t = Test.new
t.to_class_html # => "Class"
t.to_html # => "Mixin"