Sha256: 66c1441635d9e6b7dd26890d77200e42f456b4500e94e7d953a66885973a4b18

Contents?: true

Size: 483 Bytes

Versions: 7

Compression:

Stored size: 483 Bytes

Contents

# typed: true
# frozen_string_literal: true

require "ast"
require "sorbet-runtime"

module Packwerk
  # An interface describing some 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

7 entries across 7 versions & 1 rubygems

Version Path
packwerk-1.1.3 lib/packwerk/constant_name_inspector.rb
packwerk-1.1.2 lib/packwerk/constant_name_inspector.rb
packwerk-1.1.1 lib/packwerk/constant_name_inspector.rb
packwerk-1.1.0 lib/packwerk/constant_name_inspector.rb
packwerk-1.0.2 lib/packwerk/constant_name_inspector.rb
packwerk-1.0.1 lib/packwerk/constant_name_inspector.rb
packwerk-1.0.0 lib/packwerk/constant_name_inspector.rb