Class: Ruboty::TrustMe::Actions::Trust

Inherits:
Actions::Base
  • Object
show all
Defined in:
lib/ruboty/trust_me/actions/trust.rb

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
13
# File 'lib/ruboty/trust_me/actions/trust.rb', line 5

def call
  if message[:name]
    message.robot.trusted_names <<  message[:name]
    message.reply("I trust #{message[:name]}.")
  else
    message.robot.trusted_names << message.from_name
    message.reply('I trust you.')
  end
end