I have a Date
class which I would like to use to overwrite Ruby's Date
class. However, whenever I do a require 'Date'
in my other files, it includes Ruby's Date
class and not my own.
I thought that putting it in a module would work well, so I did so within the Date.rb
file:
module myModule
class Date
#...
end
end
However I still can't figure out how to make my other classes include THIS Date
class and not the built-in class. How can I achieve this?
All help is appreciated and thanks in advance!