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
Post a Comment