エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
リファクタリング:Rubyエディションを読んだ - hitode909の日記
アサーションの導入というのが紹介されていて,便利そうだった. assertにブロックを渡して,結果が偽の... アサーションの導入というのが紹介されていて,便利そうだった. assertにブロックを渡して,結果が偽のとき例外が起きるようにする. こういう感じ. module Assertions class AssertionError < StandardError end def assert(&block) yield or raise AssertionError end end class Human include Assertions def initialize(name) assert{ name != nil } @name = name end end Human.new(nil) # ここで例外が起きる こういうのはよいと思う. リファクタリング:Rubyエディション 作者: Jay Fields,Shane Harvie,Martin Fowler,Kent Beck,長尾
2010/06/18 リンク