문제

Say I've been hacking away at something in Rails console and in the process I've created some classes and methods I'd like to keep. Is there a way to get this code somehow, and dump it to a file or something so I don't need to type it all again (and potentially forget something or make mistakes)?

도움이 되었습니까?

해결책

Check out pry: http://pryrepl.org/ It has a nice feature for browsing methods source so probably there will be no difference do the same with class instances.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top