Tbpgr Blog

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

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

TbpgrUtils | 追加要件 AttrEnumerable#each_attr 追加

概要 追加要件 AttrEnumerable#each_attr 追加 詳細 追加要件 AttrEnumerable#each_attr 仕様 ・規約により、クラス名をスネークケースにしたArrayのAttributesを持つこと ・ArrayのAttributesの各クラスが持つAttributesへのイテレータを提供する ※より詳細…

Ruby | CLI | Be Easy to Use | CommandLineを理解する | Commands

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Be Easy to Use | CommandLineを理解する 詳細 CommandLineの構成要素を理解する | Commands Commands シンプルなコマンドラインアプリケーションは Options と Arguments だけで済む。 しか…

Ruby | CLI | Be Easy to Use | CommandLineを理解する | Arguments

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 CommandLineを理解する 詳細 Be Easy to Use | CommandLineの構成要素を理解する | Arguments Arguments Arguments はコマンドラインで扱う対象を表す。 典型的な例としては、ファイル名やデ…

Ruby | CLI | Be Easy to Use | CommandLineを理解する | Options

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 CommandLineを理解する 詳細 Be Easy to Use | CommandLineの構成要素を理解する | Options Options Optionsはユーザーがアプリケーションの動作を変えるための方法です。・Short-Form Short…

Ruby | CLI | Be Easy to Use | CommandLineを理解する

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Be Easy to Use | CommandLineを理解する 詳細 CommandLineの構成要素を理解する 基本構成 例えば ls コマンドで rb のファイルを更新日付の降順で詳細表示したい場合 ls -ltr *.rb のように…

Ruby | CLI | Be Easy to Use

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Be Easy to Use 詳細 自分のアプリケーションをインストール後、Userが初めに経験するのはCLIだろう。 CLIが難しく、直観的ではなく、醜くければ多くの信頼を得られないだろう。 逆に、もし…

Ruby | CLI | Have a Clear Concise Purpose | 素晴らしいCLI Appを作るには

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Have a Clear Concise Purposee | 素晴らしいCLI Appを作るには 素晴らしいCLI Appの特徴 ・Easy to user ・Helpful ・Plays well with others ・Has sensible defaults but is configurable…

Ruby | CLI | Have a Clear Concise Purpose | サブセットを持つコマンド

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Have a Clear Concise Purposee | サブセットを持つコマンド サブセットを持つコマンド例:仕様 ※書籍に載っていたものとは全く別のものです。 同じような内容を自分独自の仕様で考えました…

Ruby | CLI | Have a Clear Concise Purpose | 単一目的のシンプルなケースへの変更例

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Have a Clear Concise Purposee | 単一目的のシンプルなケースへの変更例 ツールの単純化例:仕様 ※書籍に載っていたものとは全く別のものです。 同じような内容を自分独自の仕様で考えまし…

Ruby | CLI | Have a Clear Concise Purpose

概要 書籍 Build Awesome Command-Line Applications in Ruby2 章 Have a Clear Concise Purpose 詳細 単一目的のコマンドラインアプリケーションが望ましい。 入力を受け取り、出力を提供する。驚くほどシンプルな手法。単一目的のツールは、覚えるのが簡単…

Ruby | Kernel | print

概要 Kernel#print(*arg) -> nil 詳細 引数を順に標準出力 $stdout に出力します。引数が与えられない時には変数 「$_」 の値を出力します。 文字列以外が与えられた場合は to_s して出力する。 変数 「$,」 に値がセットされている場合は、各引数の間にその…