struct Athena::DependencyInjection::Proxy(O)
inherits Struct
#
Represents a lazily initialized service.
See the "Service Proxies" section within ADI::Register
.
Constructors#
.new(service_id : String, loader : Proc(O))
#
Methods#
#instance : O
#
Returns proxied service O
; instantiating it if it has not already been.
#instantiated? : Bool
#
Returns whether the proxied service has been instantiated yet.
#service_id : String
#
Returns the service ID (name) of the proxied service.
#service_type : O.class
#
Returns the type of the proxied service.