Class: InplaceCommand

Inherits:
FileCommand show all
Defined in:
lib/file_command.rb

Instance Method Summary collapse

Methods inherited from FileCommand

#run

Instance Method Details

#cmd_txt(infiles, outfile) ⇒ Object



77
78
79
80
81
# File 'lib/file_command.rb', line 77

def cmd_txt(infiles, outfile)
  raise "can handle only 1 file in #{self.class} but got #{infiles.size} #{infiles.inspect}" if infiles.size != 1
  FileUtils.mv infiles[0], outfile
  cmd_txt_inplace(outfile)
end

#inplace?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/file_command.rb', line 72

def inplace?
  true
end