class FilterRename::Filters::ReplaceFrom

Public Class Methods

hint() click to toggle source
# File lib/filter_rename/filters.rb, line 415
def self.hint; 'Replace the REGEX matching text with the TARGET content'; end
params() click to toggle source
# File lib/filter_rename/filters.rb, line 416
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 418
def filter(params)
  regexp = Regexp.new(params[0], get_config(:ignore_case).to_boolean)
  super get_string.gsub(regexp, get_string(params[1]).to_s)
end