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, #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
599 600 601 |
# File 'lib/filter_rename/filters.rb', line 599 def self.hint "Move the NTH1 word to the NTH2 place" end |
.params ⇒ Object
603 604 605 |
# File 'lib/filter_rename/filters.rb', line 603 def self.params "NTH1,NTH2" end |
Instance Method Details
#filtered_word(word, param_num) ⇒ Object
611 612 613 614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/filter_rename/filters.rb', line 611 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
607 608 609 |
# File 'lib/filter_rename/filters.rb', line 607 def indexed_params 2 end |