Class: Ruboty::Handlers::GoodNight

Inherits:
Base
  • Object
show all
Defined in:
lib/ruboty/handlers/good_night.rb

Constant Summary collapse

BRAIN_NAMESPACE =
'ruboty-goodnight'

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ GoodNight

Returns a new instance of GoodNight.



8
9
10
11
12
13
# File 'lib/ruboty/handlers/good_night.rb', line 8

def initialize(*args)
  super
  if room
    trap_message(room)
  end
end

Instance Method Details

#greet(message) ⇒ Object



15
16
17
18
# File 'lib/ruboty/handlers/good_night.rb', line 15

def greet(message)
  save(message)
  message.reply('まだ寝ないよ!')
end