Module: Leap::Whip::Registered

Defined in:
lib/leap/whip.rb

Overview

Give Procs the capacity to remember their result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#resultObject (readonly)

Result storage



56
57
58
# File 'lib/leap/whip.rb', line 56

def result
  @result
end

Instance Method Details

#callObject

Override Proc#call here to ensure storage



59
60
61
# File 'lib/leap/whip.rb', line 59

def call
  @result = super
end