Class: Ruboty::Actions::Help

Inherits:
Base
  • Object
show all
Defined in:
lib/ruboty/actions/help.rb

Instance Attribute Summary

Attributes inherited from Base

#message

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Ruboty::Actions::Base

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
# File 'lib/ruboty/actions/help.rb', line 4

def call
  descriptions = filtered_descriptions
  if descriptions.empty?
    message.reply("No description matched to '#{message[:filter]}'")
  else
    message.reply(descriptions.join("\n"), code: true)
  end
end