Tbpgr Blog

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

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

TbpgrUtils | 追加要件 AttrEnumerable#delete_attr 追加

概要 追加要件 AttrEnumerable#delete_attr 追加 詳細 追加要件 AttrEnumerable#delete_attr 仕様 ・規約により、クラス名をスネークケースにしたArrayのAttributesを持つこと ・Attributesの任意のメンバ変数が引数で指定の場合に該当要素を削除します、 ※…

Ruby | CLI | Delight Casual Users | Flag Arguments That Control Output Formatting

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Delight Casual Users 詳細 フラグの典型的な利用方法として出力フォーマットの変更がある。 典型的なのはアプリケーション向けの標準フォーマットと人間向けのPrettyフォーマット。どちらを…

Ruby | CLI | Delight Casual Users | Default Values for Flags

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Delight Casual Users 詳細 ユーザーがコマンドを実行する際に毎回フラグを指定しなければならないのなら、 ユーザーフレンドリーではありません。デフォルト値の設定は設計の決定事項です。…

Ruby | CLI | Delight Casual Users | Naming Commands in a Command Suit

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Delight Casual Users 詳細 Command suit において全てのコマンドは簡潔で明確な名前を持つこと。 もし、意味をなすことができるならコマンドは短いニーモニックを持つのも良い。 良い例は l…

Ruby | CLI | Delight Casual Users | Choosing Names for Options and Commands

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Delight Casual Users 詳細 Short-form optionは何のためにあるか? => アプリケーションを使い慣れたユーザーが少ないタイプで素早く実行するため。Long-form optionは何のためにあるか? =…

Ruby | Kernel | require_relative

概要 require_relative(relative_feature) -> bool 詳細 Ruby ライブラリ relative_feature を現在のファイルからの相対パスでロードします。 拡張子補完を行い、 同じファイルの複数回ロードはしません。ライブラリのロードに成功した時には true を返し、…