Sha256: 0382544010de0e79a3c177f52bc2a6a3a4a66a57124cd9a14bb83c191dad16a1

Contents?: true

Size: 364 Bytes

Versions: 4

Compression:

Stored size: 364 Bytes

Contents

module Biobot
  module Commands
    module Greeting
      def self.included(base)
        base.register_command(:handle_greeting)
      end

      def handle_greeting(message)
        case message.body.downcase
        when /^hello/, /^hey/, /^hi/, /^sup/, /^greetings/
          'Hello there!'
        else
          false
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
viking-biobot-0.0.1 lib/biobot/commands/greeting.rb
viking-biobot-0.0.2 lib/biobot/commands/greeting.rb
viking-biobot-0.0.3 lib/biobot/commands/greeting.rb
viking-biobot-0.0.4 lib/biobot/commands/greeting.rb