Initial draft of the Pry adapter

I'm opening this PR so the Pry code becomes easier for review.

What I have done now is the initial idea with most of the corner cases, I have found till now, tackled in "some" way. I'll polish it and add tests in the following commits.