Class: FilterRename::Filters::PrependToNumber

Inherits:
FilterRename::FilterNumber 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 inherited from FilterRename::FilterNumber

calculator

Methods included from IndexedParams

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



696
697
698
# File 'lib/filter_rename/filters.rb', line 696

def self.hint
  "Prepend the TEXT to the NTH number"
end

.paramsObject



700
701
702
# File 'lib/filter_rename/filters.rb', line 700

def self.params
  "NTH,TEXT"
end

Instance Method Details

#filtered_number(num, _param_num) ⇒ Object



704
705
706
# File 'lib/filter_rename/filters.rb', line 704

def filtered_number(num, _param_num)
  "#{params[1]}#{num}"
end