Class: NCATTED_SET_VARIABLE_UNITS_cmd

Inherits:
InplaceCommand show all
Includes:
NCO_warning_filter
Defined in:
lib/file_command.rb

Instance Method Summary collapse

Methods included from NCO_warning_filter

#command_success?

Methods inherited from InplaceCommand

#cmd_txt, #inplace?

Methods inherited from FileCommand

#run

Constructor Details

#initialize(var_name, unit) ⇒ NCATTED_SET_VARIABLE_UNITS_cmd

Returns a new instance of NCATTED_SET_VARIABLE_UNITS_cmd.



280
281
282
# File 'lib/file_command.rb', line 280

def initialize(var_name, unit)
  @var_name, @unit = var_name, unit
end

Instance Method Details

#cmd_txt_inplace(file) ⇒ Object



284
285
286
287
# File 'lib/file_command.rb', line 284

def cmd_txt_inplace(file)
  # beware: the attribute is called 'units' (with 's')
  %Q(#{SYSTEM_COMMANDS::NCATTED} --create_ram -h -a units,#{@var_name},o,c,"#{@unit}" #{file})
end