module Pry::Testable::Variables
def insert_variable(name, value, binding)
-
(void)
-
Parameters:
-
binding
(Binding
) -- -
value
(String
) -- -
name
(String
) --
def insert_variable(name, value, binding) Pry.current[:pry_local] = value binding.eval("#{name} = ::Pry.current[:pry_local]") ensure Pry.current[:pry_local] = nil end
def temporary_constants(*names)
-
(void)
-
Parameters:
-
names
(Array
) --
def temporary_constants(*names) names.each do |name| Object.remove_const name if Object.const_defined?(name) end yield ensure names.each do |name| Object.remove_const name if Object.const_defined?(name) end end