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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
pete higgins
March 05, 2013
Programming
88
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
93
Rails Archeology
phiggins
2
130
Webmock
phiggins
0
82
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
490
Other Decks in Programming
See All in Programming
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
110
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
550
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
540
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
580
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
160
Claspは野良GASの夢をみるか
takter00
0
200
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
800
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
Oxcを導入して開発体験が向上した話
yug1224
4
320
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
AI: The stuff that nobody shows you
jnunemaker
PRO
8
720
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
140
エンジニアに許された特別な時間の終わり
watany
107
250k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Navigating Team Friction
lara
192
16k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
210
It's Worth the Effort
3n
188
29k
Context Engineering - Making Every Token Count
addyosmani
9
970
Ethics towards AI in product and experience design
skipperchong
2
310
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
870
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