Class: Lita::Handlers::Hello

Inherits:
Handler
  • Object
show all
Defined in:
lib/lita/handlers/hello.rb

Instance Method Summary collapse

Instance Method Details

#say_hello(response) ⇒ Object



9
10
11
12
13
14
# File 'lib/lita/handlers/hello.rb', line 9

def say_hello(response)
  reply_to_name = response.user.['mention_name'].nil? ?
                   "#{response.user.name}" : 
      "#{response.user.metadata['mention_name']}"
  response.reply "Hello #{reply_to_name}!"
end