Sha256: 806760b55a2a3989ae54a3a5d1241e9e936131eebb2602256caef1f1ef9e2392
Contents?: true
Size: 374 Bytes
Versions: 19
Compression:
Stored size: 374 Bytes
Contents
class SlackSmartBot def build_help(path) help_message = {} Dir["#{path}/*"].each do |t| if Dir.exist?(t) help_message[t.scan(/\/(\w+)$/).join.to_sym] = build_help(t) else help_message[t.scan(/\/(\w+)\.rb$/).join.to_sym] = IO.readlines(t).join.scan(/#\s*help\s*\w*:(.*)/).join("\n") end end return help_message end end
Version data entries
19 entries across 19 versions & 1 rubygems