lib/ruboty/handlers/ragoon.rb in ruboty-ragoon-0.2.1 vs lib/ruboty/handlers/ragoon.rb in ruboty-ragoon-0.3.0
- old
+ new
@@ -1,11 +1,16 @@
module Ruboty
module Handlers
class Ragoon < Base
- on(/ragoon( me)? (?<date>.+)/, name: 'schedule', description: 'retrieve schedule from garoon')
+ on(/grn event(?<date>\Z|\s+.+)/, name: 'schedule', description: 'retrieve schedule from garoon')
+ on(/grn notice/, name: 'notification', description: 'show new notification from garoon')
def schedule(message)
- ::Ruboty::Actions::Ragoon.new(message).call
+ ::Ruboty::Actions::Event.new(message).call
+ end
+
+ def notification(message)
+ ::Ruboty::Actions::Notification.new(message).call
end
end
end
end