Class: FilterRename::Filters::Wrap

Inherits:
FilterRename::FilterRegExp show all
Defined in:
lib/filter_rename/filters.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FilterRename::FilterRegExp

#filter

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



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

def self.hint; 'Wrap the text matching REGEX with SEPARATOR1 and SEPARATOR2'; end

.paramsObject



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

def self.params; 'REGEX,SEPARATOR1,SEPARATOR2'; end

Instance Method Details

#filtered_regexp(matches, params) ⇒ Object



815
816
817
# File 'lib/filter_rename/filters.rb', line 815

def filtered_regexp(matches, params)
  "#{params[1]}#{matches[0]}#{params[2]}"
end