Class: FilterRename::Filters::Select

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



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

def self.hint; 'Select the target where apply further transformations'; end

.paramsObject



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

def self.params; 'name|ext|folder|...'; end

Instance Method Details

#filter(params) ⇒ Object

Raises:



11
12
13
14
# File 'lib/filter_rename/filters.rb', line 11

def filter(params)
  raise InvalidTarget, params[0] unless has_target? params[0].to_sym
  set_config :target, params[0].to_sym
end