module Hypo::LifetimeFriendly
Public Instance Methods
use_lifetime(name)
click to toggle source
# File lib/hypo/lifetime_friendly.rb, line 3 def use_lifetime(name) unless @container.lifetimes.key? name raise ContainerError, "Lifetime with name \"#{name}\" is not registered" end @lifetime = @container.lifetimes[name] @lifetime.preload(self) if @lifetime.respond_to? :preload self end
Also aliased as: using_lifetime