Class: Yardstick::Rules::ExampleTag
- Inherits:
-
Yardstick::Rule
- Object
- Yardstick::Rule
- Yardstick::Rules::ExampleTag
- Defined in:
- lib/yardstick/rules/example_tag.rb
Overview
Checks if method has @example tag
This applies only for public methods
Instance Attribute Summary
Attributes inherited from Yardstick::Rule
Instance Method Summary collapse
-
#valid? ⇒ Boolean
private
True if has example tag.
-
#validatable? ⇒ Boolean
private
True if method is not private and it returns something meaningful.
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 has example tag.
28 29 30 |
# File 'lib/yardstick/rules/example_tag.rb', line 28 def valid? has_tag?('example') 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 is not private and it returns something meaningful.
18 19 20 |
# File 'lib/yardstick/rules/example_tag.rb', line 18 def validatable? !api?(%w[ private ]) && tag_types('return') != %w[ undefined ] end |