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
Safe Navigation in Ruby 2.3
Search
Rick Liu
January 22, 2016
Programming
0
62
Safe Navigation in Ruby 2.3
Introduction the new operator and its problem.
Rick Liu
January 22, 2016
Tweet
Share
More Decks by Rick Liu
See All by Rick Liu
Functional Programming Concepts
rickliu
0
220
You Don't Need a JavaScript Framework
rickliu
0
130
Agile Design
rickliu
0
78
Active Job in Rails 4.2
rickliu
0
57
Other Decks in Programming
See All in Programming
AI & Enginnering
codelynx
0
110
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
CSC307 Lecture 07
javiergs
PRO
0
550
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
600
AI時代の認知負荷との向き合い方
optfit
0
150
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
Fragmented Architectures
denyspoltorak
0
150
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1k
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
63
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Ethics towards AI in product and experience design
skipperchong
2
190
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Producing Creativity
orderedlist
PRO
348
40k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
64
Designing for humans not robots
tammielis
254
26k
The SEO Collaboration Effect
kristinabergwall1
0
350
Leo the Paperboy
mayatellez
4
1.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Transcript
Safe Navigation in Ruby 2.3
Safe Navigation > some_array.first.positive? > [].first.positive? (value = some_array.first) &&
value.positive? > some_array.first&.positive? # => true # => NoMethodError: undefined method `positive?' for nil:NilClass # => nil
Safe Navigation if user.account && user.account.trial? # process trial account
settings end if user.account&.trial? # process trial account settings end if user.account && user.account != previous_account # setup new account end if user.account &.!= previous_account # setup new account end &.&, &.<<, and &.+