Class: Coffeemaker::Bot

Inherits:
Object
  • Object
show all
Defined in:
lib/coffeemaker/bot.rb,
lib/coffeemaker/bot/irc.rb,
lib/coffeemaker/bot/irc/message.rb,
lib/coffeemaker/bot/irc/commands.rb,
lib/coffeemaker/bot/irc/connection.rb

Defined Under Namespace

Classes: Irc

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Bot

Returns a new instance of Bot.



7
8
9
# File 'lib/coffeemaker/bot.rb', line 7

def initialize(options)
  @irc = Irc.new(options)
end

Instance Attribute Details

#ircObject (readonly)

Returns the value of attribute irc.



5
6
7
# File 'lib/coffeemaker/bot.rb', line 5

def irc
  @irc
end

Instance Method Details

#start(&block) ⇒ Object



11
12
13
14
# File 'lib/coffeemaker/bot.rb', line 11

def start(&block)
  @irc.start
  block.call(@irc) if block_given?
end

#stopObject



16
17
18
# File 'lib/coffeemaker/bot.rb', line 16

def stop
  @irc.stop
end