Module: Temppath::OriginalMethodHolder
- Defined in:
- lib/temppath.rb
Overview
OriginalMethodHolder keeps some original methods of Pathname.
Class Method Summary collapse
- .extended(obj) ⇒ Object private
Class Method Details
.extended(obj) ⇒ Object
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.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/temppath.rb', line 36 def self.extended(obj) # keep original methods obj.instance_exec do class << self alias :orig_open :open alias :orig_mkdir :mkdir alias :orig_mkpath :mkpath alias :orig_sysopen :sysopen end end end |