Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Behaviour
- def child_class
- Child
- end
- end
- module Family
- class Child; end
- class Sibling
- behaviour = Behaviour.clone
- behaviour.send(:define_method, :const_missing, method(:const_get))
- include behaviour
- end
- end
- p Family::Sibling.new.child_class
Add Comment
Please, Sign In to add comment