Sha256: 8458ce8049d7e133877ce1c6f28946733736e96f326cb9ed14c2ca0bb8699a4d
Contents?: true
Size: 439 Bytes
Versions: 20
Compression:
Stored size: 439 Bytes
Contents
class Module private # Include module and apply module_fuction to the # included methods. # # module Utils # module_function # def foo; "foo"; end # end # # module UtilsPlus # include_function_module Utils # end # # CREDIT: Trans def include_function_module *mod include(*mod) module_function(*mod.collect{|m| m.private_instance_methods & m.methods(false)}.flatten) end end
Version data entries
20 entries across 19 versions & 2 rubygems