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
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
Jetpack Compose Mechanisms
skydoves
3
820
AmebaブログはKMPから卒業します
kmars0605
0
190
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
R8 の設定見直しでアプリサイズ削減
andpad
0
220
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
360
カツオ、ご期待ください
suneo3476
0
190
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.6k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
730
Making the Leap to Tech Lead
cromwellryan
135
10k
KATA
mclloyd
PRO
35
16k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Visualization
eitanlees
153
17k
Claude Code のすすめ
schroneko
67
230k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
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