Sha256: 7de5345e2e7f2ab9f60ab318ec2b4fbfaefe7e421e30386428a739f35ee969fd

Contents?: true

Size: 535 Bytes

Versions: 6

Compression:

Stored size: 535 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)
      MODUDULE_FUNCTION_NODE = s(:send, nil, :module_function)

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

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/access_modifier_node.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/access_modifier_node.rb
rubocop-0.27.1 lib/rubocop/cop/mixin/access_modifier_node.rb
rubocop-0.27.0 lib/rubocop/cop/mixin/access_modifier_node.rb
rubocop-0.26.1 lib/rubocop/cop/mixin/access_modifier_node.rb
rubocop-0.26.0 lib/rubocop/cop/mixin/access_modifier_node.rb