#define_method affects the class itself, which is declared at the beginning of the global context.