Class: LazyLoad::Mixin::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/lazy_load.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wrapped) ⇒ Wrapper

Returns a new instance of Wrapper.



83
84
85
# File 'lib/lazy_load.rb', line 83

def initialize(wrapped)
  @wrapped = wrapped
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object



88
89
90
# File 'lib/lazy_load.rb', line 88

def method_missing(*args)
  @wrapped.send(*args)
end

Instance Attribute Details

#wrappedObject (readonly)

Returns the value of attribute wrapped.



86
87
88
# File 'lib/lazy_load.rb', line 86

def wrapped
  @wrapped
end

Instance Method Details

#respond_to?(name) ⇒ Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/lazy_load.rb', line 92

def respond_to?(name)
  super || @wrapped.respond_to?(name)
end