wraps an initialization block so that it can be deferred to a later time when object methods are called.
wrap an object - see samples/self_healing.rb
client = Manana.deferred_init { Weather.setup # initialize the class Weather # return the Weather class }
Parameters:
object initialization. the block must return the object to be wrapped.
Returns:
a wrapped version of the object.
29 30 31
# File 'lib/manana.rb', line 29 def self.deferred_init(&initialization_block) Manana.new(&initialization_block) end