Class: FilterRename::Filters::CopyWord
- Inherits:
-
FilterRename::FilterWord
- Object
- SimpleDelegator
- FilterRename::FilterBase
- FilterRename::FilterWord
- FilterRename::Filters::CopyWord
- 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, #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
.hint ⇒ Object
317 318 319 |
# File 'lib/filter_rename/filters.rb', line 317 def self.hint "Copy the NTH1 word to the NTH2 place" end |
.params ⇒ Object
321 322 323 |
# File 'lib/filter_rename/filters.rb', line 321 def self.params "NTH1,NTH2" end |
Instance Method Details
#filtered_word(word, param_num) ⇒ Object
329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/filter_rename/filters.rb', line 329 def filtered_word(word, param_num) case param_num when 1 @word = word when .length word = [word, @word].join(ws) else @word = [@word, word].join(ws) end word end |
#indexed_params ⇒ Object
325 326 327 |
# File 'lib/filter_rename/filters.rb', line 325 def indexed_params 2 end |