Class: FilterRename::Filters::MultiplyNumber

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 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



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

def self.hint; 'Multiply the NTH number with NUM'; end

.paramsObject



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

def self.params; 'NTH,NUM'; end

Instance Method Details

#filtered_number(num, param_num) ⇒ Object



494
495
496
# File 'lib/filter_rename/filters.rb', line 494

def filtered_number(num, param_num)
  num.to_i * params[1].to_i
end