File: internal.rb

package info (click to toggle)
ruby-zeitwerk 2.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 752 kB
  • sloc: ruby: 6,467; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 260 bytes parent folder | download
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