Sha256: 661c5056e4b2f769863b94f70d45281823d149928f170e7d08a0dca6f2408bec
Contents?: true
Size: 506 Bytes
Versions: 10
Compression:
Stored size: 506 Bytes
Contents
class Module private # Alias a module function so that the alias is also # a module function. The typical #alias_method # does not do this. # # module Demo # module_function # def hello # "Hello" # end # end # # Demo.hello #=> Hello # # module Demo # alias_module_function( :hi , :hello ) # end # # Demo.hi #=> Hello # def alias_module_function(new, old) alias_method(new, old) module_function(new) end end
Version data entries
10 entries across 10 versions & 1 rubygems