Last active
August 29, 2015 14:24
-
-
Save notblizzard/76907730d1da92f2977c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here we define plugins for the bot. This is different from commands. | |
module Plugin | |
attr_accessor :match, :classes | |
def self.included(base) | |
@classes = [] || @classes | |
@classes << base.name | |
end | |
def match str | |
@match = str | |
end | |
def self.classes | |
@classes | |
end | |
end | |
class Hello | |
include Plugin | |
match '/hello' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment