class LazyObject

Public Class Methods

new(&callable) click to toggle source
# File lib/services/lazy_object.rb, line 3
def initialize(&callable)
        @callable = callable
end

Public Instance Methods

==(object) click to toggle source
# File lib/services/lazy_object.rb, line 11
def ==(object)
  __target_object__ == object
end
__target_object__() click to toggle source
# File lib/services/lazy_object.rb, line 7
def __target_object__
        @__target_object__ ||= @callable.call
end
method_missing(method_name, *args, &block) click to toggle source
# File lib/services/lazy_object.rb, line 15
def method_missing(method_name, *args, &block)
        __target_object__.send(method_name, *args, &block)
end