Sha256: 1e39404bf2a8a9c4dbd255c66c0870ab6ae3b9b164d4dea2f1f1cfb6f02ebba3

Contents?: true

Size: 553 Bytes

Versions: 26

Compression:

Stored size: 553 Bytes

Contents

#!/usr/bin/env ruby

require "ripper-tags"

module Textbringer
  module TagParser
    def on_method_add_arg(call, args)
      call_name = call&.slice(0)
      first_arg = args&.slice(0) == :args && args[1]
      if call_name == :fcall && first_arg && call[1][0] == "define_command"
        [:def, args[1][0], call[1][1]]
      else
        super(call, args)
      end
    end
  end
end

RipperTags::Parser.prepend(Textbringer::TagParser)

begin
  RipperTags.process_args(ARGV)
rescue => e
  STDERR.printf("%s: %s\n", File.basename($0), e)
  exit(1)
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
textbringer-0.2.5 exe/tbtags
textbringer-0.2.3 exe/tbtags
textbringer-0.2.2 exe/tbtags
textbringer-0.2.1 exe/tbtags
textbringer-0.2.0 exe/tbtags
textbringer-0.1.9 exe/tbtags