I'm trying to refine 'get' method inside HTTP class with no success.
I anticipate to get 'HTTP#get in Faker" in output; but the program runs the original 'get' method inside Net::HTTP.
Are we allowed to do the following code in Ruby 2.1?
require 'net/http'
module Faker
refine Net::HTTP do
def self.get(dummy)
puts "HTTP#get in Faker"
end
end
end
using Faker
uri = URI('http://www.google.com')
x = Net::HTTP.get(uri)