Sha256: b1b7a2d9a6c191faf2f13296b1d2d414f079ada464150c5204e7110e6b4b825b

Contents?: true

Size: 494 Bytes

Versions: 6

Compression:

Stored size: 494 Bytes

Contents

module Tap
  module Support
    module Lazydoc
      class Method < Comment
        def resolve(lines)
          super
          @subject =~ /def \w+(\((.*?)\))?/

          args = $2.to_s.split(',').collect do |arg|
            arg = arg.strip.upcase
            case arg
            when /^&/ then nil
            when /^\*/ then arg[1..-1] + "..."
            else arg
            end
          end

          @subject = args.join(', ')
          self
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
bahuvrihi-tap-0.10.5 lib/tap/support/lazydoc/method.rb
bahuvrihi-tap-0.10.6 lib/tap/support/lazydoc/method.rb
bahuvrihi-tap-0.10.7 lib/tap/support/lazydoc/method.rb
bahuvrihi-tap-0.10.8 lib/tap/support/lazydoc/method.rb
bahuvrihi-tap-0.11.0 lib/tap/support/lazydoc/method.rb
tap-0.11.0 lib/tap/support/lazydoc/method.rb