Skip to content

Instantly share code, notes, and snippets.

View jwigal's full-sized avatar

Jeff Wigal jwigal

View GitHub Profile
@jwigal
jwigal / car.rb
Created January 22, 2012 18:22 — forked from otobrglez/car.rb
Experimenting with observer pattern (publish/subscribe pattern) in Ruby
# Simple Car class. Nothing special here...
class Car
attr_accessor :brand
attr_accessor :model
attr_accessor :year
def initialize(brand, model, year=2011)
@brand, @model, @year = brand, model, year
end