class Boxwerk::PackageContext
Runtime context for the current package, accessible via Boxwerk.package. Available during boot.rb execution and throughout the application.
Attributes
@return [PackageContext::Autoloader] Autoloader configuration for this package.
@return [String] The package name (e.g. +โpacks/ordersโ+ or +โ.โ+ for root).
@return [String] Absolute path to the package directory.
Public Class Methods
Source
# File lib/boxwerk/package_context.rb, line 16 def initialize(name:, root_path:, config:, autoloader:) @name = name @root_path = root_path @config = config.freeze @autoloader = autoloader end
Public Instance Methods
Source
# File lib/boxwerk/package_context.rb, line 29 def config @config end
@return [Hash] Frozen package configuration from package.yml.
Source
# File lib/boxwerk/package_context.rb, line 24 def root? @name == '.' end
@return [Boolean] Whether this is the root package.