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
84
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
88
Rails Archeology
phiggins
2
120
Webmock
phiggins
0
76
Ruby Stdlib's Benchmark
phiggins
0
67
Rails Maintainance Headaches
phiggins
0
140
Hacking Ruby
phiggins
3
220
Cute Animals You've Never Heard Of
phiggins
0
480
Other Decks in Programming
See All in Programming
Architectural Extensions
denyspoltorak
0
280
AI & Enginnering
codelynx
0
110
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
520
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
AtCoder Conference 2025
shindannin
0
1k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
190
Fragmented Architectures
denyspoltorak
0
150
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
WENDY [Excerpt]
tessaabrams
9
36k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
310
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
64
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
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