Class: FilterRename::Filters::MoveOccurrenceTo
- Inherits:
-
FilterRename::FilterOccurrence
- Object
- SimpleDelegator
- FilterRename::FilterBase
- FilterRename::FilterOccurrence
- FilterRename::Filters::MoveOccurrenceTo
- 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, #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
.hint ⇒ Object
438 |
# File 'lib/filter_rename/filters.rb', line 438 def self.hint; 'Move the NTH occurrence of REGEX to TARGET overwriting it'; end |
.params ⇒ Object
439 |
# File 'lib/filter_rename/filters.rb', line 439 def self.params; 'NTH,REGEX,TARGET'; end |
Instance Method Details
#filtered_occurrence(occurrence, param_num) ⇒ Object
445 446 447 448 |
# File 'lib/filter_rename/filters.rb', line 445 def filtered_occurrence(occurrence, param_num) set_string(occurrence, params[-1]) nil end |
#self_targeted? ⇒ Boolean
441 442 443 |
# File 'lib/filter_rename/filters.rb', line 441 def self_targeted? params[-1] == current_target end |