Class: Yardstick::Rules::Summary::Length
- Inherits:
-
Yardstick::Rule
- Object
- Yardstick::Rule
- Yardstick::Rules::Summary::Length
- Defined in:
- lib/yardstick/rules/summary.rb
Overview
Checks that method summary length doesn’t go over 80 characters
Constant Summary collapse
- MAXIMUM_LINE_LENGTH =
80
Instance Attribute Summary
Attributes inherited from Yardstick::Rule
Instance Method Summary collapse
-
#valid? ⇒ Boolean
private
True if summary length is below 80 characters.
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 length is below 80 characters.
47 48 49 |
# File 'lib/yardstick/rules/summary.rb', line 47 def valid? summary_text.split(//u).count <= MAXIMUM_LINE_LENGTH end |