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
72
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
73
Rails Archeology
phiggins
2
110
Webmock
phiggins
0
58
Ruby Stdlib's Benchmark
phiggins
0
59
Rails Maintainance Headaches
phiggins
0
130
Hacking Ruby
phiggins
3
210
Cute Animals You've Never Heard Of
phiggins
0
440
Other Decks in Programming
See All in Programming
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
2
200
"config" ってなんだ? / What is "config"?
okashoi
0
250
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
730
Netty Chicago Java User Group 2024-04-17
sullis
0
200
Ruby Pattern Matching
bkuhlmann
0
930
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
170
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
500
Java 22 Overview
kishida
1
190
try! Swift Tokyo 初参加報告LT
hinakko2
0
230
Implementing Design Systems in Swift
seyfoyun
1
460
初心者のためのRubyKaigi入門/RubyKaigi Introduction
a_matsuda
8
1.4k
Anthropic Cookbook のおすすめレシピ
schroneko
7
1.1k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
290
19k
Building Applications with DynamoDB
mza
88
5.6k
Documentation Writing (for coders)
carmenintech
61
4k
GitHub's CSS Performance
jonrohan
1025
450k
GraphQLの誤解/rethinking-graphql
sonatard
55
9.3k
Facilitating Awesome Meetings
lara
43
5.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.7k
Web Components: a chance to create the future
zenorocha
306
41k
The Invisible Side of Design
smashingmag
294
49k
Automating Front-end Workflow
addyosmani
1357
200k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
Practical Orchestrator
shlominoach
183
9.7k
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