Class: FilterRename::Filters::PrependWordFrom

Inherits:
FilterRename::FilterWord 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

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



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

def self.hint; 'Prepend with TARGET the NTH word'; end

.paramsObject



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

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

Instance Method Details

#filtered_word(word, param_num) ⇒ Object



552
553
554
555
# File 'lib/filter_rename/filters.rb', line 552

def filtered_word(word, param_num)
  set_string([word, get_string].join(ws))
  word
end

#self_targeted?Boolean

Returns:



548
549
550
# File 'lib/filter_rename/filters.rb', line 548

def self_targeted?
  true
end

#string_to_loopObject



544
545
546
# File 'lib/filter_rename/filters.rb', line 544

def string_to_loop
  get_string(params[1])
end