Sha256: 74dc374b28efd034ce438694533dea37a74d7260a4208c21cc1181ca09bb0075

Contents?: true

Size: 612 Bytes

Versions: 94

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module AST
    # A node extension for `module` nodes. This will be used in place of a
    # plain node when the builder constructs the AST, making its methods
    # available to all `module` nodes within RuboCop.
    class ModuleNode < Node
      # The identifer for this `module` node.
      #
      # @return [Node] the identifer of the module
      def identifier
        node_parts[0]
      end

      # The body of this `module` node.
      #
      # @return [Node, nil] the body of the module
      def body
        node_parts[1]
      end
    end
  end
end

Version data entries

94 entries across 74 versions & 8 rubygems

Version Path
plaid-14.13.0 vendor/bundle/ruby/3.0.0/gems/rubocop-ast-0.4.2/lib/rubocop/ast/node/module_node.rb
plaid-14.12.1 vendor/bundle/ruby/3.0.0/gems/rubocop-ast-0.4.2/lib/rubocop/ast/node/module_node.rb
plaid-14.12.0 vendor/bundle/ruby/2.6.0/gems/rubocop-ast-0.4.2/lib/rubocop/ast/node/module_node.rb
plaid-14.11.1 vendor/bundle/ruby/2.6.0/gems/rubocop-ast-0.4.2/lib/rubocop/ast/node/module_node.rb
plaid-14.10.0 vendor/bundle/ruby/2.6.0/gems/rubocop-ast-0.4.2/lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.13.0 lib/rubocop/ast/node/module_node.rb
plaid-14.7.0 vendor/bundle/ruby/2.6.0/gems/rubocop-ast-0.4.2/lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.12.0 lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.11.0 lib/rubocop/ast/node/module_node.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/rubocop-ast-1.8.0/lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.10.0 lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.9.1 lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.9.0 lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.8.0 lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.7.0 lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.6.0 lib/rubocop/ast/node/module_node.rb
cocRb-0.1.0 .bundle/ruby/3.0.0/gems/rubocop-ast-1.5.0/lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.5.0 lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.4.2 lib/rubocop/ast/node/module_node.rb
rubocop-ast-1.4.1 lib/rubocop/ast/node/module_node.rb