Tbpgr Blog

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

2014-06-02から1日間の記事一覧

TbpgrUtils | 追加要件 AttrEnumerable#map_attr 追加

概要 追加要件 AttrEnumerable#map_attr 追加 詳細 追加要件 AttrEnumerable#map_attr 仕様 ・規約により、クラス名をスネークケースにしたArrayのAttributesを持つこと ・Attributesの任意のメンバ変数を配列にし、Array#mapと同様にブロックを実行する。 ※…

Ruby | CLI | Make Configration Easy | Using Configuration File with Command Suites

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Make Configration Easy 詳細 Command Suitesのように複数のコマンドを持つ場合、コマンドごとの引数やオプションの設定が必要です。 サンプル仕様 下記記事のサンプルをベースに設定を追加…

Ruby | CLI | Make Configration Easy | Reading External Configuration from Files

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Make Configration Easy 詳細 外部設定ファイルを利用すると、ユーザーはコマンドラインの引数やオプションを与えることなく アプリケーションの振る舞いを制御できる。例えばあるオプション…

Ruby | CLI | Make Configration Easy | Why External Configuration?

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Make Configration Easy 詳細 なぜ外部設定が必要になるのか?アプリケーションの基本的な振る舞いや、新規ユーザーが使いやすく・覚えやすいように作られるが、 パワーユーザーの複雑な作業…

Ruby | Kernel | test

概要 Kernel#test(cmd, file) -> bool | Time | Integer | nil Kernel#test(cmd, file1, file2) -> bool 詳細 Kernel#test(cmd, file)は単体のファイルでファイルテストを行います。 Kernel#test(cmd, file1, file2)は二つのファイルでファイルテストを行い…