class Pry::Config::Value

Value holds a value for the given attribute and decides how it should be read. Procs get called, other values are returned as is.

@since v0.13.0 @api private

Public Class Methods

new(value) click to toggle source
# File lib/pry/config/value.rb, line 11
def initialize(value)
  @value = value
end

Public Instance Methods

call() click to toggle source
# File lib/pry/config/value.rb, line 15
def call
  unless [Config::MemoizedValue, Config::LazyValue].include?(@value.class)
    return @value
  end

  @value.call
end