リファクタリング:Rubyエディション
https://gyazo.com/7b105ccd57ca72c036c9d45cac1f7c80
目次一覧がインターネットになさそうだったので、欲しいところだけでも軽く読みつつ書いてみる
第6章 メソッドの構成方法
6.1 メソッドの抽出(Extract Method)
6.2 メソッドのインライン化(Inline Method)
6.3 一時変数のインライン化(Inline Temp)
6.4 一時変数から問い合わせメソッドへ(Replace Temp with Query)
6.5 一時変数からチェインへ(Replace Temp with Chain)
6.6 説明用変数の導入(Introduce Explaining Variable)
6.7 一時変数の分割(Split Temporary Variable)
6.8 引数への代入の除去(Remove Assignments to Parameters)
6.9 メソッドからメソッドオブジェクトへ(Replace Method with Medod Object)
6.10 アルゴリズム変更(Substitute Algorithm)
6.11 ループからコレクションクロージャメソッドへ(Replace Loop with Collection Closure Method)
6.12 サンドイッチメソッドの抽出(Extract Surrouding Method)
6.13 クラスアノテーションの導入(Introduce Class Annotation)
6.14 名前付き引数の導入(Introduce Named Parameter)
6.15 名前付き引数の除去(Remove Named Parameter)
6.16 使われていないデフォルト引数の除去(Remove unused Default Parameter)
6.17 動的メソッド定義(Dynamic Method Definition)
6.18 動的レセプタから動的メソッド定義へ(Replace Dynamic Receptor with Dynamic Method Definition)
6.19 動的レセプタの分離(Isolate Dynamic Receptor)
6.20 evelを実行時からパース時へ(Move Eval from Runtime to Parse Time)
第7章 オブジェクト間でのメンバの移動
7.1 メソッドの移動(Move Method)
7.2 フィールドの移動(Move Field)
7.3 クラスの抽出(Ectract Class)
7.4 クラスのインライン化(Inline Class)
7.5 委譲の隠蔽(Hide Delegate)
7.6 横流しブローカーの除去(Remove Middle Man)
第8章 データの構成
8.1 自己カプセル化フィールド(Self Encapsulate Field)
8.2 データ値からオブジェクトへ(Replace Data Value with Object)
8.3 値から参照へ(Change Value to Reference)
8.4 参照から値へ(Change Reference to Value)
8.5 配列からオブジェクトへ(Replace Array with Object)
8.6 ハッシュからオブジェクトへ(Replace Hash with Object)
8.7 双方リンクから双方向リンクへ(Change Undirectional Assosiation to Bidirectional)
8.8 双方向リンクから片方向リンクへ(Change Cidirectional Assosiation to Undirectional)
8.9 マジックナンバーからシンボル定数へ(Replace Magic Number with Symbolic Constant)
8.10 コレクションのカプセル化(Encapsulate Collection)
8.11 レコードからデータクラスへ(Replace Record with Data Class)
8.12 タイプコードからポリモーフィズムへ(Replace Type Code with Polymorphism)
8.13 タイプコードからモジュールのextendへ(Replace Type Code with Module Ectension)
8.14 タイプコードからState/Strategyへ(Replace Type Code with State/Strategy)
8.15 サブクラスからフィールドへ(Replace Subclass with Fields)
8.16 属性初期化の遅延実行(Lazily initialized Attribute)
8.17 属性初期化の先行実行(Eagerly Initialized Attribute)
第9章 条件式の単純化
9.1 条件文の分解(Decompose Conditional)
9.2 条件分岐の組み替え(Recompose Conditional)
9.3 条件式の統合(Consolidate Conditional Expression)
9.4 重複する条件分岐の統合(Consolidate Duplicate Conditional Fragments)
9.5 制御フラグの除去(Remove Control Flag)
9.6 条件分岐のネストからガード節へ(Replace Nested Conditional with Guard Clauses)
9.7 条件分岐からポリモーフィズムへ(Replace Conditional with Polymorphism)
9.8 nullオブジェクトの導入(Introduce Null Object)
9.9 アサーションの導入(Introduce Assersion)
10章 メソッド呼び出しの単純化
10.1 メソッド名の変更(Remane Method)
10.2 引数の追加(Add Parameter)
10.3 引数の削除(Remove Parameter)
10.4 問い合わせと更新の分離(Separate Query from Modifier)
10.5 メソッドのパラメータ化(Parameterize Method)
10.6 引数から別々のメソッドへ(Replace Parameter with Explicit Methods)
10.7 オブジェクト自体の受け渡し(Preserve Whole Object)
10.8 引数からメソッドへ(Replace Parameter with Method)
10.9 引数オブジェクトの導入(Introduce Parameter Object)
10.10 設定メソッドの削除(Remove Setting Method)
10.11 メソッドの隠蔽(Hide Method)
10.12 コンストラクタからファクトリメソッドへ(Replace Constructor with Factory Method)
10.13 エラーコードから例外へ(Replace Error Code with Exception)
10.14 例外からテストへ(Replace Exception with Test)
10.15 ゲートウェイの導入(Introduce Gateway)
10.16 式ビルダーの導入(Introduce Expression Builder)
11章 一般化の処理
11.1 メソッドの上位階層への移動(Pull Up Method)
11.2 メソッドの下位階層への移動(Push Down Method)
11.3 モジュールの抽出(Extract Module)
11.4 モジュールのインライン化(Inline Molude)
11.5 サブクラスの抽出(Extract Subclass)
11.6 継承の導入(Introduce Inheritance)
11.7 階層構造の統合(Collapse Hierarchy)
11.8 テンプレートメソッドの作成(Form Template Method)
11.9 継承から委譲へ(Replace Inheritance with Delegation)
11.10 委譲から継承へ(Replace Delegation with Hierarchy)
11.11 抽象スーパークラスからモジュールへ(Replace Abstract Superclass with Module)
第12章 大規模なリファクタリング
12.1 リファクタリングという試合の性質
12.2 大規模なリファクタリングが重要な理由
12.3 4つの大規模なリファクタリング
12.4 複合的な継承階層の分割(Tease Apart Inheritance)
12.5 手続き型設計からオブジェクト思考設計へ(Convert Procedural Design to Objects)
12.6 ドメインのプレゼンテーションからの分離(Separate Domain from Presentation)
12.7 継承階層の抽出(Extract Hierarchy)
13章 まとめ