Class: RuboCop::Cop::Doctolib::Verify
- Inherits:
-
Struct
- Object
- Struct
- RuboCop::Cop::Doctolib::Verify
- Defined in:
- lib/rubocop/cop/doctolib/no_asymmetrical_pundit_after_actions.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
Instance Method Summary collapse
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node
8 9 10 |
# File 'lib/rubocop/cop/doctolib/no_asymmetrical_pundit_after_actions.rb', line 8 def node @node end |
Instance Method Details
#actions ⇒ Object
22 23 24 25 26 |
# File 'lib/rubocop/cop/doctolib/no_asymmetrical_pundit_after_actions.rb', line 22 def actions actions = only_or_except_kwarg&.value return if actions.nil? normalize actions end |
#arguments ⇒ Object
10 11 12 |
# File 'lib/rubocop/cop/doctolib/no_asymmetrical_pundit_after_actions.rb', line 10 def arguments node.arguments[1...] end |
#covers_all? ⇒ Boolean
14 15 16 |
# File 'lib/rubocop/cop/doctolib/no_asymmetrical_pundit_after_actions.rb', line 14 def covers_all? arguments.empty? end |
#mode ⇒ Object
18 19 20 |
# File 'lib/rubocop/cop/doctolib/no_asymmetrical_pundit_after_actions.rb', line 18 def mode only_or_except_kwarg&.key&.value end |