Class: FilterRename::Filters::WrapWords

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, #self_targeted?, #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



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

def self.hint; 'Wrap the NTH word with SEPARATOR1 and SEPARATOR2'; end

.paramsObject



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

def self.params; 'NTH,SEPARATOR1,SEPARATOR2'; end

Instance Method Details

#filtered_word(word, param_num) ⇒ Object



825
826
827
# File 'lib/filter_rename/filters.rb', line 825

def filtered_word(word, param_num)
  "#{params[1]}#{word}#{params[2]}"
end