Class: EhbrsRubyUtils::Vg::Patchers::TempFiles
- Inherits:
-
Object
- Object
- EhbrsRubyUtils::Vg::Patchers::TempFiles
- Defined in:
- lib/ehbrs_ruby_utils/vg/patchers/temp_files.rb
Instance Method Summary collapse
Instance Method Details
#input ⇒ Object
9 10 11 |
# File 'lib/ehbrs_ruby_utils/vg/patchers/temp_files.rb', line 9 def input swaped? ? temp0 : initial end |
#move_result_to(dest) ⇒ Object
13 14 15 16 17 |
# File 'lib/ehbrs_ruby_utils/vg/patchers/temp_files.rb', line 13 def move_result_to(dest) return unless swaped? ::FileUtils.mv(temp0.to_path, dest.to_path) end |
#output ⇒ Object
19 20 21 |
# File 'lib/ehbrs_ruby_utils/vg/patchers/temp_files.rb', line 19 def output temp1 end |
#swap ⇒ Object
23 24 25 26 27 28 |
# File 'lib/ehbrs_ruby_utils/vg/patchers/temp_files.rb', line 23 def swap temp0_current = temp0 self.temp0 = temp1 self.temp1 = temp0_current @swaped = true end |
#swaped? ⇒ Boolean
30 31 32 |
# File 'lib/ehbrs_ruby_utils/vg/patchers/temp_files.rb', line 30 def swaped? @swaped ? true : false end |