Class: Chef::DelayedEvaluator

Inherits:
Proc
  • Object
show all
Defined in:
lib/chef/delayed_evaluator.rb

Instance Method Summary collapse

Instance Method Details

#dupObject



20
21
22
23
# File 'lib/chef/delayed_evaluator.rb', line 20

def dup
  # super returns a "Proc" (which seems buggy) so re-wrap it
  self.class.new(&super) # rubocop:disable Layout/SpaceAroundKeyword
end

#inspectObject



25
26
27
# File 'lib/chef/delayed_evaluator.rb', line 25

def inspect
  "lazy { (evaluates to) #{call.inspect} }"
end