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
90
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
94
Rails Archeology
phiggins
2
130
Webmock
phiggins
0
83
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
Oxlintはいいぞ(続)
yug1224
1
440
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
250
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
380
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
210
AWS Transform Customによる Spring Boot 2.xから4.xへのVerUp
satoshi256kbyte
2
100
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
530
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
380
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
110
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
130
ALB ログから Trace を気合で繋げる技術
fohte
3
330
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
150
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
1
4.5M
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
The untapped power of vector embeddings
frankvandijk
2
1.8k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
360
Designing for Timeless Needs
cassininazir
1
450
Being A Developer After 40
akosma
91
590k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
490
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
220
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