Class: FilterRename::Filters::MoveWord
- Inherits:
-
FilterRename::FilterWord
- Object
- SimpleDelegator
- FilterRename::FilterBase
- FilterRename::FilterWord
- FilterRename::Filters::MoveWord
- 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, #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
453 |
# File 'lib/filter_rename/filters.rb', line 453 def self.hint; 'Move the NTH1 word to the NTH2 place'; end |
.params ⇒ Object
454 |
# File 'lib/filter_rename/filters.rb', line 454 def self.params; 'NTH1,NTH2'; end |
Instance Method Details
#filtered_word(word, param_num) ⇒ Object
458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/filter_rename/filters.rb', line 458 def filtered_word(word, param_num) case param_num when 1 @word = word res = nil when .length res = [word, @word].join(ws) else @word = [@word, word].join(ws) res = nil end res end |
#indexed_params ⇒ Object
456 |
# File 'lib/filter_rename/filters.rb', line 456 def indexed_params; 2; end |