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

Version Path
slack-smart-bot-1.8.2 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.8.1 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.8.0 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.7.0 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.8 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.7 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.6 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.5 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.4 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.3 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.2 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.1 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.6.0 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.5.1 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.5.0 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.4.3 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.4.2 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.4.1 lib/slack/smart-bot/utils/build_help.rb
slack-smart-bot-1.4.0 lib/slack/smart-bot/utils/build_help.rb