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, #indexed_params, #indexes, #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



724
725
726
# File 'lib/filter_rename/filters.rb', line 724

def self.hint
  "Prepend with TARGET the NTH word"
end

.paramsObject



728
729
730
# File 'lib/filter_rename/filters.rb', line 728

def self.params
  "NTH,TARGET"
end

Instance Method Details

#filtered_word(word, _param_num) ⇒ Object



740
741
742
743
# File 'lib/filter_rename/filters.rb', line 740

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

#self_targeted?Boolean

Returns:



736
737
738
# File 'lib/filter_rename/filters.rb', line 736

def self_targeted?
  true
end

#string_to_loopObject



732
733
734
# File 'lib/filter_rename/filters.rb', line 732

def string_to_loop
  get_string(params[1])
end