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

How to logout from a login page in asp.net -

java - More than one row with the given identifier was found: 1, for class: com.model.Diagnosis -