Sha256: e46129cb3b1a205fea25732a4300527a5666c07d3e923204bd3a678f1eccc78d

Contents?: true

Size: 276 Bytes

Versions: 7

Compression:

Stored size: 276 Bytes

Contents

require 'dependency_injection/definition'
require 'dependency_injection/proxy_object'

module DependencyInjection
  class LazyDefinition < Definition
    def object
      return @proxy_object if @proxy_object

      @proxy_object = ProxyObject.new { super }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dependency_injection-0.4.3 lib/dependency_injection/lazy_definition.rb
dependency_injection-0.4.2 lib/dependency_injection/lazy_definition.rb
dependency_injection-0.4.1 lib/dependency_injection/lazy_definition.rb
dependency_injection-0.4.0 lib/dependency_injection/lazy_definition.rb
dependency_injection-0.3.1 lib/dependency_injection/lazy_definition.rb
dependency_injection-0.3.0 lib/dependency_injection/lazy_definition.rb
dependency_injection-0.2.0 lib/dependency_injection/lazy_definition.rb