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

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

Instance Method Summary collapse

Instance Method Details

#inputObject



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

def input
  swaped? ? temp0 : initial
end

#move_result_to(dest) ⇒ Object



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

def move_result_to(dest)
  return unless swaped?

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

#outputObject



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

def output
  temp1
end

#swapObject



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

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

#swaped?Boolean

Returns:

  • (Boolean)


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

def swaped?
  @swaped ? true : false
end