Class: TestBench::Controls::KernelSubstitute
- Inherits:
-
Object
- Object
- TestBench::Controls::KernelSubstitute
- Defined in:
- lib/test_bench/controls/kernel_substitute.rb
Defined Under Namespace
Modules: FileMap, Files, TestScript
Instance Attribute Summary collapse
-
#file_map ⇒ Object
readonly
Returns the value of attribute file_map.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file_map) ⇒ KernelSubstitute
constructor
A new instance of KernelSubstitute.
- #load(path) ⇒ Object
Constructor Details
#initialize(file_map) ⇒ KernelSubstitute
Returns a new instance of KernelSubstitute.
13 14 15 |
# File 'lib/test_bench/controls/kernel_substitute.rb', line 13 def initialize file_map @file_map = file_map end |
Instance Attribute Details
#file_map ⇒ Object (readonly)
Returns the value of attribute file_map.
11 12 13 |
# File 'lib/test_bench/controls/kernel_substitute.rb', line 11 def file_map @file_map end |
Class Method Details
Instance Method Details
#load(path) ⇒ Object
17 18 19 20 21 |
# File 'lib/test_bench/controls/kernel_substitute.rb', line 17 def load path ruby_text = file_map[path] TOPLEVEL_BINDING.eval ruby_text, path end |