Class: FilterRename::Filters::ReplaceOccurrence

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



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

def self.hint; 'Replace the NTH occurrence of REGEXP with TEXT'; end

.paramsObject



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

def self.params; 'NTH,REGEXP,TEXT'; end

Instance Method Details

#filtered_occurrence(occurrence, param_num) ⇒ Object



593
594
595
# File 'lib/filter_rename/filters.rb', line 593

def filtered_occurrence(occurrence, param_num)
  params[2]
end