Class: Pry::Config::Value Private

Inherits:
Object show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/config/value.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

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

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Value

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Value.

Since:

  • v0.13.0



11
12
13
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/config/value.rb', line 11

def initialize(value)
  @value = value
end

Instance Method Details

#callObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • v0.13.0



15
16
17
18
19
20
21
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pry-0.14.2/lib/pry/config/value.rb', line 15

def call
  unless [Config::MemoizedValue, Config::LazyValue].include?(@value.class)
    return @value
  end

  @value.call
end