Class: Ruboty::Actions::Ragoon::Notification
- Inherits:
-
Base
- Object
- Base
- Ruboty::Actions::Ragoon::Notification
- Includes:
- Ruboty::Actions::Ragoon
- Defined in:
- lib/ruboty/actions/ragoon/notification.rb
Instance Method Summary collapse
Methods included from Ruboty::Actions::Ragoon
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ruboty/actions/ragoon/notification.rb', line 5 def call notifications = ::Ruboty::Ragoon::Notification.new(.robot.brain) notifications.retrieve unless notifications.empty? reply = [":new: #{notifications.unread_count}件の新着通知があります #{notifications.list_url}"] if private? reply += notifications.list.find_all(&:unread).map(&:format) end .reply(reply.join("\n")) end end |