Class: Yardstick::Rules::Summary::Presence

Inherits:
Yardstick::Rule show all
Defined in:
lib/yardstick/rules/summary.rb

Overview

Checks if method summary is present

Instance Attribute Summary

Attributes inherited from Yardstick::Rule

#document

Instance Method Summary collapse

Methods inherited from Yardstick::Rule

coerce, #enabled?, #initialize

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 is not empty.

Returns:

  • (Boolean)

    true if summary text is not empty

See Also:

  • description


29
30
31
# File 'lib/yardstick/rules/summary.rb', line 29

def valid?
  !summary_text.empty?
end

#validatable?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 method does not have @see tag.

Returns:

  • (Boolean)

    true if method does not have @see tag

See Also:

  • Rule::validatable?


19
20
21
# File 'lib/yardstick/rules/summary.rb', line 19

def validatable?
  !has_tag?('see')
end