struct Athena::DependencyInjection::Proxy(O)

Overview

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

Defined in:

proxy.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

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

[View source]

Macro Detail

macro method_missing(call) #

[View source]

Instance Method Detail

def instance : O #

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


[View source]
def instantiated? : Bool #

Returns whether the proxied service has been instantiated yet.


[View source]
def service_id : String #

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


[View source]
def service_type : O.class #

Returns the type of the proxied service.


[View source]