Sha256: c0363a6455b6c4aa6f43e052ee195dfc43ad77fc78b49951ae5dc1bb77d35169

Contents?: true

Size: 369 Bytes

Versions: 4

Compression:

Stored size: 369 Bytes

Contents

module Reek
  module Source

    #
    # A comment header from an abstract syntax tree; found directly above
    # module, class and method definitions.
    #
    class CodeComment

      def initialize(text)
        @text = text.gsub(/#/, '').gsub(/\n/, '').strip
      end
      def is_descriptive?
        @text.split(/\s+/).length >= 2
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
reek-1.2.7.3 lib/reek/source/code_comment.rb
reek-1.2.7.2 lib/reek/source/code_comment.rb
reek-1.2.7.1 lib/reek/source/code_comment.rb
reek-1.2.7 lib/reek/source/code_comment.rb