Sha256: f239a11fee48c2aacfeec027735639bac1b6f42c614363def819a9d9890f1e8b
Contents?: true
Size: 622 Bytes
Versions: 3
Compression:
Stored size: 622 Bytes
Contents
module Chatterbot # # reply method for responding to tweets module Reply # handle replies for the bot def replies(&block) return unless require_login debug "check for replies since #{since_id}" results = client.replies(:since_id => since_id) if results.is_a?(Hash) && results.has_key?("error") critical results["error"] else results.each { |s| s.symbolize_keys! unless ! block_given? || on_blacklist?(s) || skip_me?(s) update_since_id(s) yield s end } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
chatterbot-0.2.2 | lib/chatterbot/reply.rb |
chatterbot-0.2.1 | lib/chatterbot/reply.rb |
chatterbot-0.2.0 | lib/chatterbot/reply.rb |