alexiamcdonald / PrincessBride

A small Rails app to explain the Observer Design Pattern using the Princess Bride example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Princess Bride Observer Design Pattern Example

To run this example clone the repo

$ git clone https://github.com/alexiamcdonald/PrincessBride.git

Run Bundle

$ bundle

Run a Rails console

$ rails c

Then create a new movie

$ m = Movie.new

Add a plot to the movie

$ m.plot

Now try and save this plot to see the plot twist

$ m.save

You should see the vengeance_observer being called.

Congrats you can now go squash some bugs.

Have fun!

You can find my slides in the slides folder

About

A small Rails app to explain the Observer Design Pattern using the Princess Bride example


Languages

Language:Ruby 76.1%Language:HTML 18.7%Language:CSS 2.6%Language:JavaScript 2.5%