Class: FilterRename::Filters::WrapWords

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FilterRename::FilterWord

#filter

Methods included from IndexedParams

#get_indexes, #indexed_params

Methods inherited from FilterRename::FilterBase

#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



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

def self.hint; 'Wrap the words between the NTH1 and the NTH2 with SEPARATOR1 and SEPARATOR2'; end

.paramsObject



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

def self.params; 'NTH1,NTH2,SEPARATOR1,SEPARATOR2'; end

Instance Method Details

#filtered_word(word, params, param_num) ⇒ Object



648
649
650
651
652
653
654
655
656
# File 'lib/filter_rename/filters.rb', line 648

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

#indexed_wordsObject



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

def indexed_words; 2; end