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
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
530
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
350
Other Decks in Programming
See All in Programming
SODA - FACT BOOK(JP)
sodainc
1
40k
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.4k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
160
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
150
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
220
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
540
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
210
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
190
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
180
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
300
オーケストレーション記述言語 Katari
yukikurage
0
240
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
630
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
Faster Mobile Websites
deanohume
310
32k
Evolving SEO for Evolving Search Engines
ryanjones
0
360
エンジニアに許された特別な時間の終わり
watany
109
250k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
510
A Modern Web Designer's Workflow
chriscoyier
699
190k
30 Presentation Tips
portentint
PRO
1
460
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
470
WCS-LA-2024
lcolladotor
0
980
The Language of Interfaces
destraynor
162
27k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
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