c = C.new
p c.kind_of?(X) #=> false
c.extend X
p c.kind_of?(X) #=> true
c.decommisson(X) # <- my pseudo instruction to undo the 'extend'
p c.kind_of?(X) #=> false

c = C.new
p c.kind_of?(X) #=> false
c.extend X
p c.kind_of?(X) #=> true
c.decommisson(X) # <- my pseudo instruction to undo the 'extend'
p c.kind_of?(X) #=> false

best regards,

I haven't used it yet, but I think Shin-ichiro Hara's import-module is what you're looking for: