Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Pussy
- def self.m_func(name)
- meth = instance_method name
- define_singleton_method meth.name, meth
- @__m_func_includes_list__ = (@__m_func_includes_list__ || []) << meth
- end
- def self.included(mod)
- @__m_func_includes_list__.each do |m_func|
- # todo add duplication for m_func
- mod.send :private, m_func.name
- end
- super
- end
- def show
- p '-.-'
- end; m_func :show
- def fill_in
- p 'oh, you!'
- end; m_func :fill_in
- end
- class Women
- include Pussy
- def do_job
- show
- fill_in
- end
- end
- Pussy.show
- Women.new.do_job
- begin
- Women.new.show
- rescue => e
- puts 'PUSSY NOT ALLOWED, THE REASON IS --> ' + e.message
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement