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
Lightweight Objects Seattle.rb
Search
pete higgins
March 05, 2013
Programming
1
79
Lightweight Objects Seattle.rb
pete higgins
March 05, 2013
Tweet
Share
More Decks by pete higgins
See All by pete higgins
Help Seattle.rb
phiggins
0
84
Rails Archeology
phiggins
2
120
Webmock
phiggins
0
73
Ruby Stdlib's Benchmark
phiggins
0
64
Rails Maintainance Headaches
phiggins
0
140
Hacking Ruby
phiggins
3
220
Cute Animals You've Never Heard Of
phiggins
0
470
Other Decks in Programming
See All in Programming
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
Kiroで始めるAI-DLC
kaonash
2
590
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
Deep Dive into Kotlin Flow
jmatsu
1
350
意外と簡単!?フロントエンドでパスキー認証を実現する WebAuthn
teamlab
PRO
2
760
Cache Me If You Can
ryunen344
2
1.4k
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
10
4.2k
旅行プランAIエージェント開発の裏側
ippo012
2
910
Processing Gem ベースの、2D レトロゲームエンジンの開発
tokujiros
2
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
Compose Multiplatform × AI で作る、次世代アプリ開発支援ツールの設計と実装
thagikura
0
160
AIコーディングAgentとの向き合い方
eycjur
0
270
Featured
See All Featured
Site-Speed That Sticks
csswizardry
10
820
Unsuck your backbone
ammeep
671
58k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
520
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
112
20k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Why Our Code Smells
bkeepers
PRO
339
57k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Transcript
Lightweight Objects Pete Higgins Seattle.rb
Me twitter: @pete_higgins github: @phiggins
Not me
Also not me
Me
Me
Me
Why? * Fast development * boilerplate == typos * less
typing, laziness
Hash/Array/etc * Familiar * Builtin * (Relatively) efficient * Do
a lot out of the box
Downsides * Bad at conveying purpose
OpenStruct
Configuration
Simple Stubs
Result/Status
Default is nil
Struct
Simple stubs
Result/Status
Downsides * Not much more work to just use a
class * Not easy to initialize with a hash
Struct creation
OpenStruct vs. Hash ¯\_( ツ )_/¯
Minitest::Mock
Questions? twitter: @pete_higgins github: @phiggins