Sha256: d6c3370d77c7cc43fd7928b3fb7c34e48f6905345d43186e3daf9cfc239dc929

Contents?: true

Size: 421 Bytes

Versions: 3

Compression:

Stored size: 421 Bytes

Contents

# encoding: utf-8

module RuboCop
  module Cop
    # Common functionality for checking modifier nodes.
    module AccessModifierNode
      extend AST::Sexp

      PRIVATE_NODE = s(:send, nil, :private)
      PROTECTED_NODE = s(:send, nil, :protected)
      PUBLIC_NODE = s(:send, nil, :public)

      def modifier_node?(node)
        [PRIVATE_NODE, PROTECTED_NODE, PUBLIC_NODE].include?(node)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubocop-0.25.0 lib/rubocop/cop/mixin/access_modifier_node.rb
rubocop-0.24.1 lib/rubocop/cop/mixin/access_modifier_node.rb
rubocop-0.24.0 lib/rubocop/cop/mixin/access_modifier_node.rb