class FilterRename::Filters::MoveTo
Public Class Methods
hint()
click to toggle source
# File lib/filter_rename/filters.rb, line 299 def self.hint; 'Move the text selected by REGEX to TARGET'; end
params()
click to toggle source
# File lib/filter_rename/filters.rb, line 300 def self.params; 'REGEX,TARGET'; end
Public Instance Methods
filter(params)
click to toggle source
Calls superclass method
FilterRename::FilterBase#filter
# File lib/filter_rename/filters.rb, line 302 def filter(params) regex = Regexp.new(wrap_regex(params[0]), get_config(:ignore_case).to_boolean) set_string(get_string.scan(regex).pop.to_a.pop, params[1]) str = get_string.gsub(regex, '') super str end