Module: Waylon::User::ClassMethods
- Defined in:
- lib/waylon/user.rb
Overview
Class-level methods to be added to User subclasses
Instance Method Summary collapse
-
#find_by_handle(_email) ⇒ Object
This should be overridden by subclasses to provide a mechanism for looking up Users.
-
#from_mention(_mention_string) ⇒ Object
This should be overridden by subclasses to provide a mechanism for looking up Users based on mention strings.
-
#sense ⇒ Class
Provides a simple mechanism for referencing User subclass’s Sense.
-
#whoami ⇒ Object
This should be overridden by subclasses to provide a mechanism for the bot to get its own User.
Instance Method Details
#find_by_handle(_email) ⇒ Object
This should be overridden by subclasses to provide a mechanism for looking up Users
17 18 19 |
# File 'lib/waylon/user.rb', line 17 def find_by_handle(_email) raise NotImplementedError, "find_by_handle isn't implemented" end |
#from_mention(_mention_string) ⇒ Object
This should be overridden by subclasses to provide a mechanism for looking up Users based on mention strings
22 23 24 |
# File 'lib/waylon/user.rb', line 22 def from_mention(_mention_string) raise NotImplementedError, "from_mention isn't implemented" end |
#sense ⇒ Class
Provides a simple mechanism for referencing User subclass’s Sense
28 29 30 |
# File 'lib/waylon/user.rb', line 28 def sense Sense end |
#whoami ⇒ Object
This should be overridden by subclasses to provide a mechanism for the bot to get its own User
33 34 35 |
# File 'lib/waylon/user.rb', line 33 def whoami raise NotImplementedError, "whoami isn't implemented" end |