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
130
0
Share
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
150
Hex Core
wojtekmach
0
150
Recurrences & Intervals
wojtekmach
2
490
Building an Umbrella Project
wojtekmach
21
6.1k
Advanced OOP in Elixir
wojtekmach
6
670
OOP in Elixir
wojtekmach
4
310
Pattern Matching
wojtekmach
1
320
Other Decks in Programming
See All in Programming
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
540
存在論的プログラミング: 時間と存在を記述する
koriym
5
790
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
240
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
550
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
220
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
270
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
Coding as Prompting Since 2025
ragingwind
0
750
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
210
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
440
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
24k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Evolving SEO for Evolving Search Engines
ryanjones
0
170
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
510
Building Flexible Design Systems
yeseniaperezcruz
330
40k
How to Talk to Developers About Accessibility
jct
2
170
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
110
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
170
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
96
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