Class: FilterRename::Filters::CopyNumberTo

Inherits:
FilterRename::FilterNumber show all
Defined in:
lib/filter_rename/filters.rb

Instance Attribute Summary

Attributes included from IndexedParams

#items, #params, #params_expanded

Class Method Summary collapse

Instance Method Summary collapse

Methods included from IndexedParams

#filter, #get_indexes, #indexed_params, #normalize_index, #string_to_loop

Methods inherited from FilterRename::FilterBase

#current_target, #filter, #get_config, #get_string, #get_words, #initialize, #match?, #set_config, #set_string, #wrap_regex

Constructor Details

This class inherits a constructor from FilterRename::FilterBase

Class Method Details

.hintObject



196
# File 'lib/filter_rename/filters.rb', line 196

def self.hint; 'Copy the NTH number to TARGET'; end

.paramsObject



197
# File 'lib/filter_rename/filters.rb', line 197

def self.params; 'NTH,TARGET'; end

Instance Method Details

#filtered_number(num, param_num) ⇒ Object



203
204
205
206
# File 'lib/filter_rename/filters.rb', line 203

def filtered_number(num, param_num)
  set_string(num, params[1])
  num
end

#self_targeted?Boolean

Returns:



199
200
201
# File 'lib/filter_rename/filters.rb', line 199

def self_targeted?
  params[-1] == current_target
end