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
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
260
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
CSC307 Lecture 05
javiergs
PRO
0
500
CSC307 Lecture 03
javiergs
PRO
1
490
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
200
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
高速開発のためのコード整理術
sutetotanuki
1
400
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
130
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
ラッコキーワード サービス紹介資料
rakko
1
2.3M
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Building an army of robots
kneath
306
46k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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 &.+