Tbpgr Blog

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

2014-05-12から1日間の記事一覧

TbpgrUtils | 追加要件 Hash#>> 追加

概要 追加要件 Hash#>> 追加 詳細 追加要件 Hash#>> 仕様 ・Hashの各valueに対して任意のメソッドを呼び出す。 ※より詳細についてはGitHubのREADMEおよびテストケース参照 GitHub https://github.com/tbpgr/tbpgr_utils Rubygems http://rubygems.org/gems/t…

Ruby | Collecting Inputs | Represent special cases as Object

概要 Represent special cases as Object 前提 Confident Rubyではメソッド内の処理を次のように分類しています。 ・Collecting Inputs(引数チェック、変換など) ・Performing Work(主処理) ・Delivering Output(戻り値に関わる処理) ・Handling Failure(…

Ruby | Collecting Inputs | Handle special cases with Guard Clause

概要 Handle special cases with Guard Clause 前提 Confident Rubyではメソッド内の処理を次のように分類しています。 ・Collecting Inputs(引数チェック、変換など) ・Performing Work(主処理) ・Delivering Output(戻り値に関わる処理) ・Handling Fail…

Ruby | Collecting Inputs | Document assumptions with assertions

概要 Document assumptions with assertions 前提 Confident Rubyではメソッド内の処理を次のように分類しています。 ・Collecting Inputs(引数チェック、変換など) ・Performing Work(主処理) ・Delivering Output(戻り値に関わる処理) ・Handling Failur…

Ruby | Collecting Inputs | Use #fetch for defaults

概要 Use #fetch for defaults 前提 Confident Rubyではメソッド内の処理を次のように分類しています。 ・Collecting Inputs(引数チェック、変換など) ・Performing Work(主処理) ・Delivering Output(戻り値に関わる処理) ・Handling Failure(例外処理)当…

Ruby | Collecting Inputs | Use #fetch to assert the presence of Hash keys

概要 Use #fetch to assert the presence of Hash keys 前提 Confident Rubyではメソッド内の処理を次のように分類しています。 ・Collecting Inputs(引数チェック、変換など) ・Performing Work(主処理) ・Delivering Output(戻り値に関わる処理) ・Handl…

Ruby | Kernel | exit

概要 Kernel#exit(status = true) -> () 詳細 Rubyプログラムの実行を終了します。status として整 数が与えられた場合、その値を Ruby コマンドの終了ステータスとします。 status が true の場合 正常終了、 false の場合 異常終了となります。 サンプルコ…