Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

2012-07-24から1日間の記事一覧

書籍 リーダブルコード | 三項演算子

パンくず リーダブルコード 三項演算子 概要 三項演算子 内容 三項演算子を利用する場合はコードが簡潔な場合に限る。 サンプルコード def is_hoge(target) return target == "hoge"; end %w [hoge hage hige].each do |each_word| # 3項演算子だとシンプル…