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
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
480
Building an Umbrella Project
wojtekmach
21
6.1k
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
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
0
300
The free-lunch guide to idea circularity
hollycummins
0
270
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.9k
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1k
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
440
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
610
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
190
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
310
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
290
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
140
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
710
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Music & Morning Musume
bryan
47
7.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
130
The browser strikes back
jonoalderson
0
810
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Optimizing for Happiness
mojombo
378
71k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
180
Build your cross-platform service in a week with App Engine
jlugia
234
18k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
Documentation Writing (for coders)
carmenintech
77
5.3k
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