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
AtCoder Conference 2025
shindannin
0
1k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Oxlint JS plugins
kazupon
1
810
Fluid Templating in TYPO3 14
s2b
0
130
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
180
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
700
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
Oxlintはいいぞ
yug1224
5
1.3k
Patterns of Patterns
denyspoltorak
0
1.4k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Site-Speed That Sticks
csswizardry
13
1.1k
Between Models and Reality
mayunak
1
180
Rails Girls Zürich Keynote
gr2m
96
14k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
So, you think you're a good person
axbom
PRO
2
1.9k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Into the Great Unknown - MozCon
thekraken
40
2.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
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