Add default delay range, configure check

This commit is contained in:
Jaiden Mispy 2014-12-12 22:53:19 +11:00
parent 730f833d6d
commit 64c1aa411c

View file

@ -180,12 +180,17 @@ module Ebooks
@seen_tweets ||= {}
@username = username
@delay_range ||= 1..6
configure
b.call(self) unless b.nil?
Bot.all << self
end
def configure
raise ConfigurationError, "Please override the 'configure' method for subclasses of Ebooks::Bot."
end
# Find or create the conversation context for this tweet
# @param tweet [Twitter::Tweet]
# @return [Ebooks::Conversation]