Class: Bender::Processor::Basics

Inherits:
BaseProcessor show all
Defined in:
processors/basics.rb

Overview

Description

All the basic stuff Bender should do

Dependencies

none

Configuration

none

Authors

Michael Heijmans ([email protected])

Instance Attribute Summary

Attributes inherited from BaseProcessor

#bot, #command, #msg, #origin, #room

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseProcessor

#call, #directly_addressed?, #hear, #initialize, #reply, #respond, #should_process?

Constructor Details

This class inherits a constructor from Bender::BaseProcessor

Class Method Details

.helpObject


21
22
23
24
25
26
27
# File 'processors/basics.rb', line 21

def self.help
  [
    "#{Bender.nickname} version - replies with the Bender Version",
    "#{Bender.nickname} PING - replies with 'PONG'",
    "#{Bender.nickname}? - replies with 'Kiss my shiny metal ass"
  ]
end

Instance Method Details

#processObject


15
16
17
18
19
# File 'processors/basics.rb', line 15

def process
  respond(/version\??$/i)       { reply "#{Bender::VERSION}" }
  respond(/PING$/)              { reply "PONG" }
  hear(/^#{@bot.nickname}\??$/) { reply 'Kiss my shiny metal ass' }
end