Sha256: d671f9e34d46f87095dc7cba07760dfea366c4bcceca5d5606b954f14a5bc5b7
Contents?: true
Size: 431 Bytes
Versions: 1
Compression:
Stored size: 431 Bytes
Contents
module Ellen module Handlers class Help < Base on /help\z/, description: "Show this help message" do |message| lines = Ellen.handlers.map(&:actions).flatten.sort_by(&:all?).map do |action| prefix = "@#{name} " unless action.all? line = "%-30s - #{action.description}" % "#{prefix}#{action.pattern.inspect}" line end say lines.join("\n") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ellen-0.0.6 | lib/ellen/handlers/help.rb |