Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Something that should never be done... http://ruby.zigzo.com/2017/10/21/refinements-fancy-monkey/
module IntegerRefinements
refine Integer do
def to_s
'TWO, ALWAYS TWO!!!!'
end
end
end
class CrazyInteger
using IntegerRefinements
def self.crazy_string(number)
number.to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment