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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
pete higgins
March 05, 2013
Programming
91
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
98
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
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
440
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2.3k
Railsバージョンを4倍にした話
optim
0
430
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
500
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
phperだってパンチカードでコーディングしたい
o0h
PRO
0
340
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
960
R8 の設定見直しでアプリサイズ削減
andpad
0
220
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Product Roadmaps are Hard
iamctodd
55
13k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Un-Boring Meetings
codingconduct
0
460
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Chasing Engaging Ingredients in Design
codingconduct
0
360
A designer walks into a library…
pauljervisheath
211
25k
Prompt Engineering for Job Search
mfonobong
0
520
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
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