Class: Yardstick::Rules::Summary::SingleLine
- Inherits:
-
Yardstick::Rule
- Object
- Yardstick::Rule
- Yardstick::Rules::Summary::SingleLine
- Defined in:
- lib/yardstick/rules/summary.rb
Overview
Checks that method summary length is exactly one line
Constant Summary collapse
- LINE_BREAK_CHARACTER =
"\n"
Instance Attribute Summary
Attributes inherited from Yardstick::Rule
Instance Method Summary collapse
-
#valid? ⇒ Boolean
private
True if summary text does not include a new line.
Methods inherited from Yardstick::Rule
coerce, #enabled?, #initialize, #validatable?
Constructor Details
This class inherits a constructor from Yardstick::Rule
Instance Method Details
#valid? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns true if summary text does not include a new line.
81 82 83 |
# File 'lib/yardstick/rules/summary.rb', line 81 def valid? !summary_text.include?(LINE_BREAK_CHARACTER) end |