class FilterRename::Filters::AppendWordFrom
Public Class Methods
hint()
click to toggle source
# File lib/filter_rename/filters.rb, line 117 def self.hint; 'Append the NTH word from TARGET'; end
params()
click to toggle source
# File lib/filter_rename/filters.rb, line 118 def self.params; 'NTH,TARGET'; end
Public Instance Methods
filter(params)
click to toggle source
# File lib/filter_rename/filters.rb, line 120 def filter(params) word = get_string(params[1]).split(ws) idx = word_idx(params[0], word) set_string [get_string, word[idx]].join(ws) end