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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Wojtek Mach
April 16, 2014
Programming
140
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
170
Hex Core
wojtekmach
0
160
Recurrences & Intervals
wojtekmach
2
510
Building an Umbrella Project
wojtekmach
21
6.1k
Advanced OOP in Elixir
wojtekmach
6
680
OOP in Elixir
wojtekmach
4
320
Pattern Matching
wojtekmach
1
330
Other Decks in Programming
See All in Programming
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
150
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
160
GitHub Copilot CLIのいいところ
htkym
2
1.3k
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
140
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
160
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
420
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.7k
Lessons from Spec-Driven Development
simas
PRO
0
140
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
470
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
170
関係性から理解する"同一性"の型用語たち
pvcresin
2
640
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
200
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
320
Tell your own story through comics
letsgokoyo
1
950
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
360
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Bash Introduction
62gerente
615
210k
Claude Code のすすめ
schroneko
67
230k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
Visualization
eitanlees
152
17k
Color Theory Basics | Prateek | Gurzu
gurzu
0
350
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
360
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