From 4aceb493faf80cbaa145027c7eab52a5409b4ff7 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sun, 26 Jul 2015 20:02:02 -0500 Subject: [PATCH] Add Editing Code In Pry as a ruby til. --- README.md | 1 + ruby/editing-code-in-pry.md | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 ruby/editing-code-in-pry.md diff --git a/README.md b/README.md index 9ff2776..09a2b1c 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Create an Array of Stringed Numbers](ruby/create-an-array-of-stringed-numbers.md) - [Destructuring Arrays In Blocks](ruby/destructuring-arrays-in-blocks.md) - [Disassemble Some Codes](ruby/disassemble-some-codes.md) +- [Editing Code In Pry](ruby/editing-code-in-pry.md) - [Evaluating One-Off Commands](ruby/evaluating-one-off-commands.md) - [FactoryGirl Sequences](ruby/factory-girl-sequences.md) - [Finding The Source of Ruby Methods](ruby/finding-the-source-of-ruby-methods.md) diff --git a/ruby/editing-code-in-pry.md b/ruby/editing-code-in-pry.md new file mode 100644 index 0000000..f9ecf91 --- /dev/null +++ b/ruby/editing-code-in-pry.md @@ -0,0 +1,10 @@ +# Editing Code In Pry + +[Pry](http://pryrepl.org/) provides an enhanced REPL experience for Ruby. +One of the enhancements it provides is the ability to open your preferred +editor within a pry session. This makes it easy to compose and edit +multi-line blocks of code. + +Try it out by typing `edit` within a pry session. Once you are ready, you +can save the file which will prompt pry to interpret the contents of your +file within the context of the pry session.