Skip to content

struct Athena::DependencyInjection::Proxy(O)
inherits Struct #

Represents a lazily initialized service. See the "Service Proxies" section within ADI::Register.

Class methods#

.new(service_id : String, loader : Proc(O)) #

View source

Methods#

#instance : O #

Returns proxied service O; instantiating it if it has not already been.

View source

#instantiated? : Bool #

Returns whether the proxied service has been instantiated yet.

View source

#service_id : String #

Returns the service ID (name) of the proxied service.

View source

#service_type : O.class #

Returns the type of the proxied service.

View source

Macros#

method_missing(call) #

View source