Sha256: cc61e43b10d6e4323c449df220cabacbf07a0a6dc8ca473f2a5fd29b22950e6d
Contents?: true
Size: 337 Bytes
Versions: 5
Compression:
Stored size: 337 Bytes
Contents
class Module # Prepend an +aspect+ module to a module. # # module X # def x; "x"; end # end # # module U # def x; '{' + super + '}'; end # end # # X.prepend U # # X.x # => "{x}" # # CREDIT Trans def prepend(aspect) aspect.__send__(:include, self) extend aspect end end
Version data entries
5 entries across 5 versions & 1 rubygems