Class: NCATTED_DELETE_VARIABLE_ATTRIBUTES_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, attribute_names) ⇒ NCATTED_DELETE_VARIABLE_ATTRIBUTES_cmd

Returns a new instance of NCATTED_DELETE_VARIABLE_ATTRIBUTES_cmd.



235
236
237
238
# File 'lib/file_command.rb', line 235

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

Instance Method Details

#cmd_txt_inplace(file) ⇒ Object



240
241
242
243
244
# File 'lib/file_command.rb', line 240

def cmd_txt_inplace(file)
  att_args = ""
  @attribute_names.each {|n| att_args += %Q( -a #{n},#{@var_name},d,,)}
  %Q(#{SYSTEM_COMMANDS::NCATTED} --create_ram -h#{att_args} #{file})
end