Sha256: f9e617807441731ce6ac80aa89192c511b6befe4894e17d320c9e9aa14dbcd76

Contents?: true

Size: 568 Bytes

Versions: 5

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

module Git
  module Lint
    module Reporters
      # Reports issues related to an invalid line within the commit body.
      class Line
        DEFAULT_INDENT = "    "

        def initialize data = {}
          @data = data
        end

        def to_s
          if content.include? "\n"
            Lines::Paragraph.new(data).to_s
          else
            Lines::Sentence.new(data).to_s
          end
        end

        private

        attr_reader :data

        def content = data.fetch(__method__)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
git-lint-2.4.0 lib/git/lint/reporters/line.rb
git-lint-2.3.3 lib/git/lint/reporters/line.rb
git-lint-2.3.2 lib/git/lint/reporters/line.rb
git-lint-2.3.1 lib/git/lint/reporters/line.rb
git-lint-2.3.0 lib/git/lint/reporters/line.rb