Sha256: ab6b07b556db82551a0914636ed513e288aa3e9f08a02d28f69b417bf09900d0

Contents?: true

Size: 313 Bytes

Versions: 2

Compression:

Stored size: 313 Bytes

Contents

class HelloWorld < Marvin::CommandHandler
  
  exposes :hello
  
  uses_datastore "hello-count", :counts
  
  def hello(data)
    self.counts ||= {}
    self.counts[options.nick] ||= 0
    self.counts[options.nick] += 1
    reply "Oh hai there - This is hello ##{self.counts[options.nick]} from you!"
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
Sutto-marvin-0.1.0.20081014 handlers/hello_world.rb
Sutto-marvin-0.1.0.20081016 handlers/hello_world.rb