Class: Ehbrs::Tools::Runner::Vg::Ips::TempFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs/tools/runner/vg/ips.rb

Instance Method Summary collapse

Instance Method Details

#inputObject



105
106
107
# File 'lib/ehbrs/tools/runner/vg/ips.rb', line 105

def input
  swaped? ? temp0 : initial
end

#move_result_to(dest) ⇒ Object



109
110
111
112
113
# File 'lib/ehbrs/tools/runner/vg/ips.rb', line 109

def move_result_to(dest)
  return unless swaped?

  ::FileUtils.mv(temp0.to_path, dest.to_path)
end

#outputObject



115
116
117
# File 'lib/ehbrs/tools/runner/vg/ips.rb', line 115

def output
  temp1
end

#swapObject



119
120
121
122
123
124
# File 'lib/ehbrs/tools/runner/vg/ips.rb', line 119

def swap
  temp0_current = temp0
  self.temp0 = temp1
  self.temp1 = temp0_current
  @swaped = true
end

#swaped?Boolean

Returns:

  • (Boolean)


126
127
128
# File 'lib/ehbrs/tools/runner/vg/ips.rb', line 126

def swaped?
  @swaped ? true : false
end