class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler

def compile_args(arg_list, first: nil)

Experimental RBS support (using type sampling data from the type_fusion project).

def compile_args: (Array[] arg_list, first: nil) -> String

This signature was generated using 1 sample from 1 application.

Returns:
  • (String, nil) -

Parameters:
  • (Array, nil) --
def compile_args(arg_list, first: nil)
  args = arg_list&.map { |arg| compiler.compile_as_atom(arg) }
  args = [first, *args] if first
  "(#{args.join(', ')})" if args
end