Class: FilterRename::Filters::AppendWordFrom

Inherits:
FilterRename::FilterWord 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

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



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

def self.hint; 'Append the NTH word from TARGET'; end

.paramsObject



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

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

Instance Method Details

#filtered_word(word, param_num) ⇒ Object



142
143
144
145
# File 'lib/filter_rename/filters.rb', line 142

def filtered_word(word, param_num)
  set_string([get_string, word].join(ws))
  word
end

#self_targeted?Boolean

Returns:



138
139
140
# File 'lib/filter_rename/filters.rb', line 138

def self_targeted?
  true
end

#string_to_loopObject



134
135
136
# File 'lib/filter_rename/filters.rb', line 134

def string_to_loop
  get_string(params[1])
end