Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Pry: IRB on vitamins
Search
iamjarvo
August 14, 2012
Programming
2
120
Pry: IRB on vitamins
Pry is a REPL that is an alternative to IRB.
iamjarvo
August 14, 2012
Tweet
Share
More Decks by iamjarvo
See All by iamjarvo
Git productivity and tricks
iamjarvo
2
170
Other Decks in Programming
See All in Programming
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
220
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
130
Honoとフロントエンドの 型安全性について
yodaka
5
330
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
160
SwiftUI Viewの責務分離
elmetal
PRO
1
220
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
Open source software: how to live long and go far
gaelvaroquaux
0
630
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
120
Formの複雑さに立ち向かう
bmthd
1
810
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
270
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
240
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
720
Featured
See All Featured
Navigating Team Friction
lara
183
15k
Music & Morning Musume
bryan
46
6.3k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
4 Signs Your Business is Dying
shpigford
182
22k
Transcript
Pry IRB on vitamins
Who am I? • Jearvon Dharrie • Twitter: @jearvon •
irc: iamjarvo
What is pry? • REPL(read, eval, print loop) • Powerful
alternative to IRB
High level view • Syntax highlighting / Proper Indentation •
Customizable • Quick documentation lookup • Quick monkey patching • Great debugging tool • Gist capabilities
Pry in my day to day • Debugging • Documentation
lookup
Installation • gem i pry pry-doc (reading stuff written in
c) • pry • help
Now the cool stuff!
Documentaion • show-doc Array#take_while • a = [1, 2, 3]
• show-doc a.take_while
Viewing Source • show-source Array#take_while -l • a = [1,2,3]
• show-source a.take_while -l
Gist • Install jist gem ( https://github.com/conradirwin/) • jist --login
• gist -m Array#take_while • gist -m a.take_while
Easily cd into a gem • gem-cd “gem name”
Shell commands • Prefix commands with . • .pwd •
.ls
REPL capabilities • input buffer multiline text waiting to be
completed • ! clears input buffer • show-input => shows the current input buffer • amend-line N replacement
Navigating around • cd object • ls • can grep
output of ls • ls -h
Patching on the fly
Current state
Rails console • Alias pryr to launch pry with rails
environment • pry -r ./config/environment
Plugins • pry-debugger • pry-remote • pry-stack_explorer • pry-theme •
pry-debundle
.pryrc • Alias commands • set colorscheme
From here • #pry on freenode • give it a
pry!