Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Formatting ruby code
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Wojtek Mach
April 16, 2014
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Formatting ruby code
Wojtek Mach
April 16, 2014
More Decks by Wojtek Mach
See All by Wojtek Mach
Writing an Ecto Adapter: Introducing MyXQL
wojtekmach
1
180
Hex Core
wojtekmach
0
180
Recurrences & Intervals
wojtekmach
2
520
Building an Umbrella Project
wojtekmach
21
6.1k
Advanced OOP in Elixir
wojtekmach
6
690
OOP in Elixir
wojtekmach
4
330
Pattern Matching
wojtekmach
1
330
Other Decks in Programming
See All in Programming
速習iPhone Duo対応
yuukiw00w
2
940
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.1k
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
220
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
520
Heart of Swift Concurrency
koher
0
1.1k
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
setup-vp GitLab対応の裏側
naokihaba
0
150
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
430
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
440
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Done Done
chrislema
187
17k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
310
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
How to Talk to Developers About Accessibility
jct
2
560
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Code Reviewing Like a Champion
maltzj
528
40k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
320
Transcript
Formatting Ruby Code
4 rules of simple design (Kent Beck) 1. All tests
pass 2. No duplicate code 3. Express all the ideas 4. Minimize classes and methods
4 rules of simple design (Kent Beck) 1. All tests
pass 2. No duplicate code 3. Express all the ideas 4. Minimize classes and methods 0. Code is properly formatted
Styleguides • https://github.com/bbatsov/ruby-style-guide • https://github.com/styleguide/ruby • etc
Styleguides
Styleguides • Styleguides are great, but...
Styleguides • Styleguides are great, but… • “Hey, can you
format code according to …”?
Go
Go • Go doesn’t have styleguides
Go • Go doesn’t have styleguides • gofmt a.go
rubyfmt
Parsing ruby code
Parsing ruby code https://github.com/seattlerb/ruby_parser
Parsing ruby code https://github.com/seattlerb/ruby2ruby
Diff
None
https://github.com/wojtekmach/rubyfmtbot
Thanks! • http://golang.org/cmd/gofmt • https://github.com/seattlerb/ruby_parser • https://github.com/seattlerb/sexp_processor • https://github.com/seattlerb/ruby2ruby •
https://github.com/wojtekmach/rubyfmt • https://github.com/wojtekmach/rubyfmtbot