Sha256: 882bfef974dd466d5274405d529f5e6704b7e35b043bd4f4c896ac97c99c7010

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

# typed: true
# frozen_string_literal: true

require "ast"

module Packwerk
  # An interface describing an object that can extract a constant name from an AST node.
  module ConstantNameInspector
    extend T::Sig
    extend T::Helpers

    interface!

    sig do
      params(node: ::AST::Node, ancestors: T::Array[::AST::Node])
        .returns(T.nilable(String))
        .abstract
    end
    def constant_name_from_node(node, ancestors:); end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
packwerk-2.1.0 lib/packwerk/constant_name_inspector.rb
packwerk-2.0.0 lib/packwerk/constant_name_inspector.rb
packwerk-1.4.0 lib/packwerk/constant_name_inspector.rb