Sha256: 3d3e42329820a88f5eee699976a24b03ab93617b484cb9260fce637471289e02

Contents?: true

Size: 467 Bytes

Versions: 176

Compression:

Stored size: 467 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module AST
    # A node extension for `procarg0` nodes.
    # This will be used in place of a plain node when the builder constructs
    # the AST, making its methods available to all `arg` nodes within RuboCop.
    class Procarg0Node < ArgNode
      # Returns the name of an argument.
      #
      # @return [Symbol, nil] the name of the argument
      def name
        node_parts[0].name
      end
    end
  end
end

Version data entries

176 entries across 170 versions & 23 rubygems

Version Path
rubocop-ast-1.12.0 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.11.0 lib/rubocop/ast/node/procarg0_node.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/rubocop-ast-1.8.0/lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.10.0 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.9.1 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.9.0 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.8.0 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.7.0 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.6.0 lib/rubocop/ast/node/procarg0_node.rb
cocRb-0.1.0 .bundle/ruby/3.0.0/gems/rubocop-ast-1.5.0/lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.5.0 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.4.2 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.4.1 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.4.0 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.3.0 lib/rubocop/ast/node/procarg0_node.rb
rubocop-ast-1.2.0 lib/rubocop/ast/node/procarg0_node.rb