Sha256: 3a2df4ccddd1d9ed8c08e5681d8e7a61d1be56b26f94cf66f0cbcfca61913cee

Contents?: true

Size: 591 Bytes

Versions: 2

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module AST
    # A node extension for `send` nodes. This will be used in place of a plain
    # node when the builder constructs the AST, making its methods available
    # to all `send` nodes within RuboCop.
    class SendNode < Node
      include ParameterizedNode
      include MethodDispatchNode

      def_node_matcher :attribute_accessor?, <<~PATTERN
        [(send nil? ${:attr_reader :attr_writer :attr_accessor :attr} $...)
         (_    _    _                                                 _ ...)]
      PATTERN
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-ast-0.2.0 lib/rubocop/ast/node/send_node.rb
rubocop-ast-0.1.0 lib/rubocop/ast/node/send_node.rb