sujay
Wed Jul 26 2023
Monkey patching in Ruby is dynamic modification of class. It means overwriting existing methods at runtime eg:
class String
def reverse
'Reverse op blocked'
end
end
'Hello'.reverse
>> 'Reverse op blocked'
sujay
Wed Jul 26 2023
Monkey patching in Ruby is dynamic modification of class. It means overwriting existing methods at runtime eg:
class String
def reverse
'Reverse op blocked'
end
end
'Hello'.reverse
>> 'Reverse op blocked'