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