File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Summary of the design patterns explained in the book [Design Patterns in Ruby](h
1313* [ Decorator] ( decorator.md ) : vary the responsibilities of an object adding some features
1414* [ Factory] ( factory.md ) : create objects without having to specify the exact class of the object that will be created
1515* [ Interpreter] ( interpreter.md ) : provides a specialized language to solve a well defined problem of know domain
16- * [ Iterator] ( iterator.md ) : provides a way to access a collection of sub-objects without exposing the underlaying representation
16+ * [ Iterator] ( iterator.md ) : provides a way to access a collection of sub-objects without exposing the underlying representation
1717* [ Observer] ( observer.md ) : helps building a highly integrated system, maintainable and avoids coupling between classes
1818* [ Proxy] ( proxy.md ) : allows us having more control over how and when we access to a certain object
1919* [ Singleton] ( singleton.md ) : have a single instance of certain class across the application
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class StringIOAdapter
5151end
5252```
5353
54- Now we can use a ` String ` as if it were an open file (it only implements a small part of the ` IO ` interface, essentally what we need).
54+ Now we can use a ` String ` as if it were an open file (it only implements a small part of the ` IO ` interface, essentially what we need).
5555
5656``` ruby
5757encrypter = Encrypter .new (' XYZZY' )
Original file line number Diff line number Diff line change 11# Iterator Pattern
22
33## Problem
4- We have an aggregate object and we want to provide a way to access its collection of sub-objects without exposing its underlaying representation.
4+ We have an aggregate object and we want to provide a way to access its collection of sub-objects without exposing its underlying representation.
55
66## Solution
77There are two proposed solutions: ** external iterators** and ** internal iterators** .
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class PlainTextFormatter
5454end
5555```
5656
57- To use it, we just provide a formated object (strategy) to the report (context)
57+ To use it, we just provide a formatted object (strategy) to the report (context)
5858
5959``` ruby
6060report = Report .new (HTMLFormatter .new )
You can’t perform that action at this time.
0 commit comments