lib/chatterbot/dsl.rb
#
# specify a bot-specific blocklist of users.  accepts an array, or a
# comma-delimited string. when called, any subsequent calls to
# search or replies will filter out these users.
#
# @param [Array, String] args list of usernames
# @example
#   blocklist "mean_user, private_user"
#
specify a bot-specific blocklist of users.  accepts an array, or a
comma-delimited string. when called, any subsequent calls to
search or replies will filter out these users.
specify a bot - specific blocklist of users . accepts an array or a comma - delimited string . when called any subsequent calls to search or replies will filter out these users .
def blocklist(*args)
      list = flatten_list_of_strings(args)
      if list.nil? || list.empty?
        bot.blocklist = []
      else
        bot.blocklist += list
      end
    end
def blocklist ( * args ) list = flatten_list_of_strings ( args ) if list . nil? || list . empty? bot . blocklist = [ ] else bot . blocklist += list end end
specify a bot-specific blocklist of users.
specify a bot - specific blocklist of users .
args
<not_specific>
<not_specific>
args list of usernames
args list of usernames
example
blocklist "mean_user, private_user"
blocklist " mean_user private_user "