Class: Markify::Bot
- Inherits:
-
Object
- Object
- Markify::Bot
- Defined in:
- lib/markify/bot.rb
Instance Method Summary collapse
-
#initialize(id, password) ⇒ Bot
constructor
A new instance of Bot.
- #send_message(receiver, message) ⇒ Object
Constructor Details
#initialize(id, password) ⇒ Bot
Returns a new instance of Bot.
24 25 26 27 28 29 |
# File 'lib/markify/bot.rb', line 24 def initialize(id, password) @client = Jabber::Client.new(id) @client.connect @client.auth(password) end |
Instance Method Details
#send_message(receiver, message) ⇒ Object
31 32 33 34 35 |
# File 'lib/markify/bot.rb', line 31 def (receiver, ) receiver.each do |r| @client.send(Jabber::Message.new(r, )) end end |