-
Notifications
You must be signed in to change notification settings - Fork 0
Basic usage
lukes edited this page May 5, 2011
·
5 revisions
First step is to require Herald into your Ruby project
require 'rubygems'
require 'herald'
Herald is configured by taking parameters inside a Ruby block
Herald.watch do
# options go here ...
end
Essential configuration parameters are check (define one of the sources to watch), and _for (define some keywords to look out for)
Herald.watch do
check :twitter
_for "soundofmusic"
end
By default, this setup will print what it finds to Ruby's stdout (usually your command terminal if you're running Herald from it).
To choose another action to perform when the herald finds some items that match the keywords in your source, add in an action.
Herald.watch do
check :twitter
_for "soundofmusic"
action :growl
end