Sha256: 9593a7872848a504e52b831cd03302184743f309052a20a2ba9a066a9d0b9578
Contents?: true
Size: 620 Bytes
Versions: 6796
Compression:
Stored size: 620 Bytes
Contents
# frozen_string_literal: true class Pry class Config # LazyValue is a Proc (block) wrapper. It is meant to be used as a # configuration value. Subsequent `#call` calls always evaluate the given # block. # # @example # num = 19 # value = Pry::Config::LazyValue.new { num += 1 } # value.foo # => 20 # value.foo # => 21 # value.foo # => 22 # # @api private # @since v0.13.0 # @see Pry::Config::MemoizedValue class LazyValue def initialize(&block) @block = block end def call @block.call end end end end
Version data entries
6,796 entries across 6,792 versions & 31 rubygems