Class: ShellMock::MonkeyPatch
- Inherits:
-
Object
- Object
- ShellMock::MonkeyPatch
show all
- Defined in:
- lib/shell_mock/monkey_patch.rb
Instance Method Summary
collapse
Instance Method Details
#disable ⇒ Object
10
11
12
13
|
# File 'lib/shell_mock/monkey_patch.rb', line 10
def disable
disable_for(Kernel.eigenclass) if Kernel.respond_to?(method_alias, true)
disable_for(Kernel) if Object.new.respond_to?(method_alias, true)
end
|
#enable ⇒ Object
5
6
7
8
|
# File 'lib/shell_mock/monkey_patch.rb', line 5
def enable
enable_for(Kernel.eigenclass) unless Kernel.respond_to?(method_alias, true)
enable_for(Kernel) unless Object.new.respond_to?(method_alias, true)
end
|