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
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
0
130
Formatting ruby code
Wojtek Mach
April 16, 2014
Tweet
Share
More Decks by Wojtek Mach
See All by Wojtek Mach
Writing an Ecto Adapter: Introducing MyXQL
wojtekmach
1
150
Hex Core
wojtekmach
0
150
Recurrences & Intervals
wojtekmach
2
470
Building an Umbrella Project
wojtekmach
21
6k
Advanced OOP in Elixir
wojtekmach
6
670
OOP in Elixir
wojtekmach
4
300
Pattern Matching
wojtekmach
1
310
Other Decks in Programming
See All in Programming
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
690
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
AgentCoreとHuman in the Loop
har1101
5
220
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
2026年 エンジニアリング自己学習法
yumechi
0
130
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
Un-Boring Meetings
codingconduct
0
200
Thoughts on Productivity
jonyablonski
74
5k
Marketing to machines
jonoalderson
1
4.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
64
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Into the Great Unknown - MozCon
thekraken
40
2.2k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Optimizing for Happiness
mojombo
379
71k
Six Lessons from altMBA
skipperchong
29
4.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
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