Sha256: 1fab88324496e0ffe5836bc0473a34af911ece9f0dc8aefdfa516d883af2627f

Contents?: true

Size: 350 Bytes

Versions: 3

Compression:

Stored size: 350 Bytes

Contents

module Ellen
  module Handlers
    class Help < Base
      on /help\z/i, name: "help", description: "Show this help message"

      def help(message)
        robot.say Ellen.actions.map {|action|
          "%-30s - #{action.description}" % "#{robot.name unless action.all?} #{action.pattern.inspect}"
        }.join("\n")
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ellen-0.1.3 lib/ellen/handlers/help.rb
ellen-0.1.2 lib/ellen/handlers/help.rb
ellen-0.1.1 lib/ellen/handlers/help.rb