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 intro
Search
mrzasa
September 16, 2017
Programming
0
35
Pry intro
PL: Wprowadzenie do pry - wygodnej konsoli Rubiego. Prezentacja z Rails Girls Rzeszów 2017
mrzasa
September 16, 2017
Tweet
Share
More Decks by mrzasa
See All by mrzasa
Magica Journey through Regex Engine Internals - T3chFest 2025
mrzasa
0
44
Debug Like a Scientist! Copenhagen Developers Festival 2024
mrzasa
1
88
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
73
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RubyConf BR
mrzasa
0
28
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RailsConf 2021
mrzasa
0
37
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
260
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
100
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
170
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
160
Other Decks in Programming
See All in Programming
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
440
機能追加とリーダー業務の類似性
rinchoku
2
1.3k
OSS開発者という働き方
andpad
5
1.7k
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
330
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
1から理解するWeb Push
dora1998
7
1.9k
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
20
11k
Processing Gem ベースの、2D レトロゲームエンジンの開発
tokujiros
2
130
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
860
Deep Dive into Kotlin Flow
jmatsu
1
340
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
530
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Rails Girls Zürich Keynote
gr2m
95
14k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Typedesign – Prime Four
hannesfritz
42
2.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Scaling GitHub
holman
463
140k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Thoughts on Productivity
jonyablonski
70
4.8k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Transcript
PRY WYGODNA KONSOLA RUBIEGO Maciek Rząsa @mjrzasa
INSTALACJA Z konsoli: $ gem install pry pry-doc W projekcie:
# Gemfile gem 'pry-rails' gem 'pry-doc' # Konsola: $ bundle install
EKSPERYMENTY Przydatne funkcje dopełnianie składni (Tab) podświetlanie składni
POZNAWANIE RUBIEGO pry> help # wyświetl opis komend pry pry>
name = "rails girls" pry> ls # wyświetl dostępne funckcje i zmienne pry> ls name # wyświetl metody obiektu pry> show-doc name.size # wyświetl opis metody pry> show-source name.size # wyświetl kod metody pry> wtf? # informacje o ostatnim błędzie
PODGLĄD APLIKACJI Aby zatrzymać wykonywanie programu: $ rails console pry>
User.count pry> User.find(1) pry> User.where(email: '
[email protected]
')
SZUKANIE BŁĘDÓW Aby zatrzymać wykonywanie programu: require 'pry' binding.pry #
wyświetla kod otaczający bieżące miejsce pry> whereami
PO CO PRY - PODSUMOWANIE szybkie eksperymenty poznawanie dokumentacji i
źródeł szukanie błędów