Skip to content

Commit 46a0b9e

Browse files
committed
fix observer page layout and remove :rubygems that is deprecated from Gemfile
1 parent 0accd0d commit 46a0b9e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source :rubygems
1+
source 'http://rubygems.org'
22

33
group :development do
44
gem "RedCloth", "~> 4.2"

Diff for: chapters/design_patterns/observer.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: recipe Observer Pattern
2+
layout: recipe
33
title: Observer Pattern
44
chapter: Design patterns
55
---
@@ -20,7 +20,7 @@ class PostOffice
2020
subscriber.callback(item) for subscriber in @subscribers when subscriber.item is item
2121
subscribe: (to, onNewItemReleased) ->
2222
@subscribers.push {'item':to, 'callback':onNewItemReleased}
23-
23+
2424
class MagazineSubscriber
2525
onNewMagazine: (item) ->
2626
alert "I've got new "+item
@@ -41,7 +41,7 @@ postOffice.notifyNewItemReleased "Mens Health"
4141

4242
## Discussion
4343

44-
Here you have an observer object (PostOffice) and observable objects (MagazineSubscriber, NewspaperSubscriber).
45-
To be notified about an event of publishing new periodical observable object should make subscribtion on PostOffice.
46-
Every of subscribed objects is stored internaly in the PostOffice array of subscribtions.
44+
Here you have an observer object (PostOffice) and observable objects (MagazineSubscriber, NewspaperSubscriber).
45+
To be notified about an event of publishing new periodical observable object should make subscribtion on PostOffice.
46+
Every of subscribed objects is stored internaly in the PostOffice array of subscribtions.
4747
Every subscriber is notified on new concrete periodical is published.

0 commit comments

Comments
 (0)