Add default delay range, configure check
This commit is contained in:
parent
730f833d6d
commit
64c1aa411c
1 changed files with 5 additions and 0 deletions
|
@ -180,12 +180,17 @@ module Ebooks
|
||||||
@seen_tweets ||= {}
|
@seen_tweets ||= {}
|
||||||
|
|
||||||
@username = username
|
@username = username
|
||||||
|
@delay_range ||= 1..6
|
||||||
configure
|
configure
|
||||||
|
|
||||||
b.call(self) unless b.nil?
|
b.call(self) unless b.nil?
|
||||||
Bot.all << self
|
Bot.all << self
|
||||||
end
|
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
|
# Find or create the conversation context for this tweet
|
||||||
# @param tweet [Twitter::Tweet]
|
# @param tweet [Twitter::Tweet]
|
||||||
# @return [Ebooks::Conversation]
|
# @return [Ebooks::Conversation]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue