class Frise::Loader::Lazy

A basic proxy object.

Public Class Methods

new(&callable) click to toggle source
# File lib/frise/loader/lazy.rb, line 7
def initialize(&callable)
  @callable = callable
end

Public Instance Methods

__target_object__() click to toggle source
# File lib/frise/loader/lazy.rb, line 11
def __target_object__
  @__target_object__ ||= @callable.call
end
method_missing(method_name, *args, &block) click to toggle source

rubocop:disable Style/MethodMissingSuper

# File lib/frise/loader/lazy.rb, line 16
def method_missing(method_name, *args, &block)
  __target_object__.send(method_name, *args, &block)
end
respond_to_missing?(method_name, include_private = false) click to toggle source

rubocop:enable Style/MethodMissingSuper

# File lib/frise/loader/lazy.rb, line 21
def respond_to_missing?(method_name, include_private = false)
  __target_object__.respond_to?(method_name, include_private)
end