I'm not sure I understood your question, but why not open a line in a file, say exclaim.rb, and then request it when you need it:
exclaim.rb
class String def exclaim self << "!!!!!" end end
and then
require "exclaim" "hello".exclaim
But maybe I missed something?
lucapette
source share