File: internal.rb

package info (click to toggle)
ruby-zeitwerk 2.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 740 kB
  • sloc: ruby: 6,242; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 260 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

# This is a private module.
module Zeitwerk::Internal
  #: (Symbol) -> void
  def internal(method_name)
    private method_name

    mangled = "__#{method_name}"
    alias_method mangled, method_name
    public mangled
  end
end