Efficient Development with Pry, Or Why You'll Love This Gem
-
Upload
flatiron-school -
Category
Software
-
view
105 -
download
7
Embed Size (px)
description
Transcript of Efficient Development with Pry, Or Why You'll Love This Gem

Ana Perez Will Lowry
Efficient Development with Pry
Flatiron School Ruby-005
Jul-29-2014

• What is Pry?
PRY
• Why you will love Pry
• Setting up Pry
• Using Pry

WHAT IS PRY?
All modern scripting languages have an Eval function that allows to Read Eval
Print Loop (REPL)
PRY is a gem that can be used as an alternative to IRB. It allows you to step into your Ruby program
by acting as an interactive shell

WHY YOU WILL LOVE PRY?
Programming Time
50%Debugging
50%Productive
Source: Evans Data Corporation (2012), Payscale (2012) RTI (2002), CVP Surveys (2012)

WHY YOU WILL LOVE PRY?
Annual Software Development Wages
Annual Software Development Wages Spent on Debugging
Source: Evans Data Corporation (2012), Payscale (2012) RTI (2002), CVP Surveys (2012)

WHY YOU WILL LOVE PRY?
Get it right the first time!


SETUP
require ‘pry’
require ‘pry-rescue/rspec’
gem install pry
gem install pry-plus

SETUP
DEMO

COMMANDS RECAP
• show-doc • show-source • ls • cd • whereami • edit
• play • wtf? • wtf???? • cat—ex • try-again