class Ruboty::Action
Public Instance Methods
call(handler, message, options = {})
click to toggle source
# File lib/ruboty/authorization.rb, line 11 def call(handler, message, options = {}) return false unless !!options[:missing] == missing? return false unless message.match(pattern_with(handler.robot.name)) authorized!(message) !!handler.send(name, message) rescue => e message.reply(e.message) if reply_error? end
owner_name()
click to toggle source
# File lib/ruboty/authorization.rb, line 30 def owner_name ENV["OWNER_NAME"] end
reply_error?()
click to toggle source
# File lib/ruboty/authorization.rb, line 34 def reply_error? ENV['NOT_REPLY_AUTHORIZATION_ERROR'].nil? end