Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Lightweight Objects Seattle.rb
Search
pete higgins
March 05, 2013
Programming
90
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lightweight Objects Seattle.rb
pete higgins
March 05, 2013
More Decks by pete higgins
See All by pete higgins
Help Seattle.rb
phiggins
0
94
Rails Archeology
phiggins
2
130
Webmock
phiggins
0
85
Ruby Stdlib's Benchmark
phiggins
0
72
Rails Maintainance Headaches
phiggins
0
150
Hacking Ruby
phiggins
3
220
Cute Animals You've Never Heard Of
phiggins
0
500
Other Decks in Programming
See All in Programming
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
430
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
110
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
150
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
App Intentsのビルドプロセスを支える技術
kntkymt
0
300
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
190
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
120
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
660
信頼性の目標を誰も求めてない
shubox
0
500
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
Family mrubyの進捗
kishima
1
110
AIエージェント時代のコードレビューを設計する
nogu66
6
2.6k
Featured
See All Featured
Fireside Chat
paigeccino
43
4k
How STYLIGHT went responsive
nonsquared
100
6.3k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The Invisible Side of Design
smashingmag
301
52k
Everyday Curiosity
cassininazir
0
320
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
Utilizing Notion as your number one productivity tool
mfonobong
4
590
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Balancing Empowerment & Direction
lara
6
1.3k
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