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
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Contemporary Test Cases
maaretp
0
120
初めてDefinitelyTypedにPRを出した話
syumai
0
330
Ethereum_.pdf
nekomatu
0
440
CSC509 Lecture 12
javiergs
PRO
0
140
Java ジェネリクス入門 2024
nagise
0
710
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
320
JavaでLチカしたい! / JJUG CCC 2024 Fall LT
nhayato
0
130
色々なIaCツールを実際に触って比較してみる
iriikeita
0
320
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
240
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
510
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.4k
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6k
Producing Creativity
orderedlist
PRO
341
39k
A designer walks into a library…
pauljervisheath
202
24k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
700
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Navigating Team Friction
lara
183
14k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
KATA
mclloyd
29
14k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Building Adaptive Systems
keathley
38
2.3k
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!