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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
90
Rails Archeology
phiggins
2
130
Webmock
phiggins
0
78
Ruby Stdlib's Benchmark
phiggins
0
68
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
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
270
SourceGeneratorのマーカー属性問題について
htkym
0
200
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
520
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
220
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
650
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
210
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
1k
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
150
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
190
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
560
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.1k
Featured
See All Featured
It's Worth the Effort
3n
188
29k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
390
Accessibility Awareness
sabderemane
0
82
Building a Scalable Design System with Sketch
lauravandoore
463
34k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
470
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
140
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Docker and Python
trallard
47
3.8k
A designer walks into a library…
pauljervisheath
210
24k
Darren the Foodie - Storyboard
khoart
PRO
3
2.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Evolving SEO for Evolving Search Engines
ryanjones
0
150
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