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