Class: Git::Lint::Reporters::Line
- Inherits:
-
Object
- Object
- Git::Lint::Reporters::Line
- Defined in:
- lib/git/lint/reporters/line.rb
Overview
Reports issues related to an invalid line within the commit body.
Constant Summary collapse
- DEFAULT_INDENT =
" "
Instance Method Summary collapse
-
#initialize(data = Core::EMPTY_HASH) ⇒ Line
constructor
A new instance of Line.
- #to_s ⇒ Object (also: #to_str)
Constructor Details
#initialize(data = Core::EMPTY_HASH) ⇒ Line
Returns a new instance of Line.
12 13 14 |
# File 'lib/git/lint/reporters/line.rb', line 12 def initialize data = Core::EMPTY_HASH @data = data end |
Instance Method Details
#to_s ⇒ Object Also known as: to_str
16 17 18 |
# File 'lib/git/lint/reporters/line.rb', line 16 def to_s content.include?("\n") ? Lines::Paragraph.new(data).to_s : Lines::Sentence.new(data).to_s end |