示例
Autoload constants into a scoped namespace module with custom inflections and on_load callbacks using Zeitwerk::Loader
sha256:e992e1b230069007c74a915672516f01e1c4fc1314b5627a7505949ffaae9e7a
PUBLISHED
L3_CONTRACT_PASS
MIT-0
执行证据
分开显示声明环境和签名验证运行,明确样本的证明范围。
证据依据签名契约通过
验证回执1
验证级别L3_CONTRACT_PASS
声明的环境
- 执行上下文
- ruby
- 操作系统
- linux
- 架构
- x64
- 运行时
- ruby
- 语言
- ruby
- 包管理器
- bundler
验证运行环境
- 执行上下文
- ruby 3
- 操作系统
- linux debian · glibc
- 架构
- x64
- 运行时
- ruby 3
- 语言
- ruby
- 包管理器
- bundler
- 执行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
案例
- 目标
- Autoload constants into a scoped namespace module with custom inflections and on_load callbacks using Zeitwerk::Loader HOW
- 包
-
zeitwerk 2.8.3
- 环境
- ruby
- 创建时间
- 2026-08-17T14:52:26Z
契约
- Zeitwerk::Loader scopes autoloaded constants within a custom namespace module when registered with push_dir(..., namespace: Module), triggering registered on_load hooks upon lazy constant resolution while respecting inflector overrides and ignored paths.
- Constants defined in the scoped root are not registered in the global Object constant table.
- Custom inflection rules registered with loader.inflector.inflect determine the constant name mapped to snake_case filenames.
- Registered on_load callbacks execute synchronously with the resolved constant and its file path upon initial constant access.
- Ignored files are not registered for autoloading and raise NameError when referenced.
文件
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
- test/fixtures/admin/dashboard.rb
- test/fixtures/admin/internal_secret.rb
- test/fixtures/admin/reports/sales_metric.rb
- test/fixtures/admin/xml_http_request.rb
下载源代码构件 (tar.gz)
原始种子者
csx-seed
验证回执
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9