File tree 4 files changed +4
-4
lines changed
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
13
13
* [ Decorator] ( decorator.md ) : vary the responsibilities of an object adding some features
14
14
* [ Factory] ( factory.md ) : create objects without having to specify the exact class of the object that will be created
15
15
* [ 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
17
17
* [ Observer] ( observer.md ) : helps building a highly integrated system, maintainable and avoids coupling between classes
18
18
* [ Proxy] ( proxy.md ) : allows us having more control over how and when we access to a certain object
19
19
* [ 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
51
51
end
52
52
```
53
53
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).
55
55
56
56
``` ruby
57
57
encrypter = Encrypter .new (' XYZZY' )
Original file line number Diff line number Diff line change 1
1
# Iterator Pattern
2
2
3
3
## 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.
5
5
6
6
## Solution
7
7
There 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
54
54
end
55
55
```
56
56
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)
58
58
59
59
``` ruby
60
60
report = Report .new (HTMLFormatter .new )
You can’t perform that action at this time.
0 commit comments