Class: PeepingTom::Notifier::IRC
- Inherits:
-
Object
- Object
- PeepingTom::Notifier::IRC
- Defined in:
- lib/peeping_tom/notifier/irc.rb
Instance Method Summary collapse
-
#initialize(server_name, port, channel_name) ⇒ IRC
constructor
A new instance of IRC.
- #notify!(site) ⇒ Object
Constructor Details
#initialize(server_name, port, channel_name) ⇒ IRC
Returns a new instance of IRC.
6 7 8 9 10 |
# File 'lib/peeping_tom/notifier/irc.rb', line 6 def initialize(server_name, port, channel_name) @server_name = server_name @port = port @channel = channel_name end |
Instance Method Details
#notify!(site) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/peeping_tom/notifier/irc.rb', line 12 def notify!(site) msg = "#{site.name} was tested at #{site.url}, and it's busted. You should look into that." ShoutBot.shout("irc://PeepingTom@#{@server_name}:#{@port}/#{@channel}") do |channel| channel.say msg end rescue SocketError #gulp gulp gulp end |