Sha256: ce4eba28d85b67b10c3379ad414c706228225693cd8c0efbaae9cf8ec9d9d5fd
Contents?: true
Size: 542 Bytes
Versions: 11
Compression:
Stored size: 542 Bytes
Contents
# This is a simple plugin the envokes the "say" command on whatever is passed # Example: # # @robut say that was awesome! # # *Requires that the "say" command is installed and in the path # class Robut::Plugin::Say include Robut::Plugin desc "say <words> - uses Mac OS X's 'say' command to speak <words>" match "^say (.*)$", :sent_to_me => true do |phrase| phrase = clean(phrase) system("say #{phrase}") end private def clean(str) str.gsub("'", "").gsub(/[^A-Za-z0-9\s]+/, " ").gsub(/\s+/, ' ').strip end end
Version data entries
11 entries across 11 versions & 2 rubygems