░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/config
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: memoized_value.rb
# frozen_string_literal: true class Pry class Config # MemoizedValue is a Proc (block) wrapper. It is meant to be used as a # configuration value. Subsequent `#call` calls return the same memoized # result. # # @example # num = 19 # value = Pry::Config::MemoizedValue.new { num += 1 } # value.call # => 20 # value.call # => 20 # value.call # => 20 # # @api private # @since v0.13.0 # @see Pry::Config::LazyValue class MemoizedValue def initialize(&block) @block = block @called = false @call = nil end def call return @call if @called @called = true @call = @block.call end end end end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 attributable.rb
RB
565 B
2023-09-24 03:48
EDIT
📄 lazy_value.rb
RB
620 B
2023-09-24 03:48
EDIT
📄 memoized_value.rb
RB
739 B
2023-09-24 03:48
EDIT
📄 value.rb
RB
503 B
2023-09-24 03:48
EDIT