Class: Yardstick::Rules::ApiTag::ProtectedMethod
- Inherits:
-
Yardstick::Rule
- Object
- Yardstick::Rule
- Yardstick::Rules::ApiTag::ProtectedMethod
- Defined in:
- lib/yardstick/rules/api_tag.rb
Overview
Checks if protected method has correct @api visibility
Instance Attribute Summary
Attributes inherited from Yardstick::Rule
Instance Method Summary collapse
-
#valid? ⇒ Boolean
private
True if api tag is semipublic or private.
-
#validatable? ⇒ Boolean
private
True if method visibility is protected.
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 api tag is semipublic or private.
63 64 65 |
# File 'lib/yardstick/rules/api_tag.rb', line 63 def valid? api?(%w[ semipublic private ]) 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 visibility is protected.
53 54 55 |
# File 'lib/yardstick/rules/api_tag.rb', line 53 def validatable? visibility == :protected end |