Rails looks for files in specific locations to execute code, not arbitrary encoded strings.
Yes, it's possible to do, but much harder than eval'ing a string in the resource file.
Yes, it's possible to do, but much harder than eval'ing a string in the resource file.
The examples from this article are all essentially malicious third-party code. No language will save you from that.
None of these suggestions are worth a damn until the WordPress team acknowledges that WordPress security is a major problem, one that should be a top priority for them.