Class: FilterRename::Filters::Template

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FilterRename::FilterBase

#current_target, #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



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

def self.hint; 'Replace the <placeholders> in TEMPLATE with the relative targets'; end

.paramsObject



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

def self.params; 'TEMPLATE'; end

Instance Method Details

#filter(params) ⇒ Object



756
757
758
# File 'lib/filter_rename/filters.rb', line 756

def filter(params)
  super params[0].gsub(/<([a-z0-9\_]+)>/) { get_string(Regexp.last_match[1]) }
end