lib/lazy_object.rb in lazy_object-0.0.1 vs lib/lazy_object.rb in lazy_object-0.0.2
- old
+ new
@@ -6,15 +6,15 @@
#
# Example:
#
# lazy = LazyObject.new { VeryExpensiveObject.new } # At this point the VeryExpensiveObject hasn't been initialized yet.
# lazy.get_expensive_results(foo, bar) # Initializes VeryExpensiveObject and calls 'get_expensive_results' on it, passing in foo and bar
-class LazyObject
-
+class LazyObject < BasicObject
+
def self.version
- '0.0.1'
+ '0.0.2'
end
-
+
def initialize(&callable)
@__callable__ = callable
end
# Cached target object.