Ruby objects to go: Copyrb - Gem for copying and pasting ruby objects
I have written a quick gem that allows you to copy and paste ruby objects across terminals. This gem has been created primarily to simplify the process of copying objects between different rails environments for people that spend a lot of time in the Rails console (like me). Some examples include long strings, or perhaps strings that are hard to copy due to the escaping involved. You might find it handy to copy the ActiveRecord object that has been misbehaving in production, or to copy an array of objects (to seed the test/development database).
- Installation is straightforward: gem install copyrb
- You will need to require the gem in both (or more) terminals with: require ‘copyrb’
- first terminal: copy my_object
- second terminal: paste #=> my_object
Feel free to check out the source on Github. Mac OSX only (for now).