Class: Nanoc::Int::Memoization::Wrapper Private

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/base/memoization.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 3.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ref) ⇒ Wrapper

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Wrapper.

Since:

  • 3.2.0



13
14
15
# File 'lib/nanoc/base/memoization.rb', line 13

def initialize(ref)
  @ref = ref
end

Instance Attribute Details

#refObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 3.2.0



11
12
13
# File 'lib/nanoc/base/memoization.rb', line 11

def ref
  @ref
end

Instance Method Details

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 3.2.0



17
18
19
20
21
22
23
24
# File 'lib/nanoc/base/memoization.rb', line 17

def inspect
  obj = @ref.object
  if obj
    obj.inspect
  else
    '<garbage collected>'
  end
end