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