Module: RuboCop::Cop::QualifierNodeMatchers
- Extended by:
- NodePattern::Macros
- Included in:
- AliasMethodOrderVerifier, OrderedMethodsCorrector
- Defined in:
- lib/rubocop/cop/qualifier_node_matchers.rb
Overview
defines matchers for qualifier nodes
Constant Summary collapse
- QUALIFIERS =
%i[ alias_method module_function private_class_method public_class_method private protected public ].freeze
Instance Method Summary collapse
Instance Method Details
#method_qualifier?(name) ⇒ Boolean
26 27 28 |
# File 'lib/rubocop/cop/qualifier_node_matchers.rb', line 26 def method_qualifier?(name) qualifiers.include?(name) end |
#qualifiers ⇒ Object
30 31 32 |
# File 'lib/rubocop/cop/qualifier_node_matchers.rb', line 30 def qualifiers @qualifiers ||= QUALIFIERS + @cop_config['MethodQualifiers'].to_a.map(&:to_sym) end |