Closed hpjaj closed 6 years ago
@hollomancer @jjhampton - the diff may appear that there were a lot of changes made, but the diff is misleading, because the change required both event/
classes to be outdented.
The only change to the message
and team_join
classes was namespacing. Meaning this:
class Event::Message < Event
instead of this:
class Event
class Message < Event
...
Description of changes
When reading through the
README
and the codebase, it was unclear how our custom "adding a new event" hook would work.After tracing through the code, it appears that you cannot just create a Slack "equally named" method anywhere. That method would, in fact, have to live in the the
operationcode_bot.rb
file in order for the hook to work.This update makes that more transparent for future contributors.
I also noticed that classes in the
event
directory are classes within classes. This is not a typical way to namespace.Traditionally, when a class is in a folder for namespacing, you either nest the class in a module, or use this namespacing
::
syntax.I refactored the two classes to use the
::
syntax.