Sha256: 752f6b3b574b6e31a3426ea53433443609f93c568d70a0317b9e6c62c6fc36a5

Contents?: true

Size: 324 Bytes

Versions: 24

Compression:

Stored size: 324 Bytes

Contents

class LazyObject < BasicObject

	def initialize(&callable)
		@callable = callable
	end

	def __target_object__
		@__target_object__ ||= @callable.call
	end

  def ==(object)
    __target_object__ == object
  end

	def method_missing(method_name, *args, &block)
		__target_object__.send(method_name, *args, &block)
	end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
CloudSesame-1.0.1 lib/services/lazy_object.rb
CloudSesame-1.0.0 lib/services/lazy_object.rb
CloudSesame-0.9.4 lib/services/lazy_object.rb
CloudSesame-0.9.3 lib/services/lazy_object.rb
CloudSesame-0.9.2 lib/services/lazy_object.rb
CloudSesame-0.9.1 lib/services/lazy_object.rb
CloudSesame-0.9.0 lib/services/lazy_object.rb
CloudSesame-0.8.3 lib/services/lazy_object.rb
CloudSesame-0.8.2 lib/services/lazy_object.rb
CloudSesame-0.8.1 lib/services/lazy_object.rb
CloudSesame-0.8.0 lib/services/lazy_object.rb
CloudSesame-0.7.13 lib/services/lazy_object.rb
CloudSesame-0.7.12 lib/services/lazy_object.rb
CloudSesame-0.7.11 lib/services/lazy_object.rb
CloudSesame-0.7.10 lib/services/lazy_object.rb
CloudSesame-0.7.9 lib/services/lazy_object.rb
CloudSesame-0.7.8 lib/services/lazy_object.rb
CloudSesame-0.7.7 lib/services/lazy_object.rb
CloudSesame-0.7.5 lib/services/lazy_object.rb
CloudSesame-0.7.4 lib/services/lazy_object.rb