ruby - Adding a new method to the Array class -


i have new requirement on array object. need add own method built-in array class.

how add new method whatever array object create, have instance method?

use ruby open classes:

class array   def mymethod     #implementation   end end 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -