A simple observer library in Ruby
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
LICENSE
README.md
Rakefile
VERSION.yml
eyeballer.gemspec

README.md

Eyeballer

A simple observer written in Ruby.

Observe:

class Foo

  def save
    "Saved!"
  end

  def whatever
    "Whatever ..."
  end

end

class MyObserver
  include Eyeballer

  observe :foo, :save => [:do_something, :do_something_else]
  observe :foo, :whatever => :do_something_else

  def do_something
    "Do something!"
  end

  def do_something_else
  "Do something else!"
  end

end