Class: FileRenamer::ParamsCorrector
- Inherits:
-
Object
- Object
- FileRenamer::ParamsCorrector
- Defined in:
- lib/params_corrector.rb
Constant Summary collapse
- SLASH =
Gem.win_platform? ? '\\' : '/'
- FILENAME_REGEXP =
/^[a-zA-Z_0-9-]+$/.freeze
- EXTENSION_REGEXP =
/^[a-zA-Z0-9_.]{1,6}$/.freeze
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
- #corrected_params(params) ⇒ Object
- #init_params(params) ⇒ Object
-
#initialize ⇒ ParamsCorrector
constructor
A new instance of ParamsCorrector.
Constructor Details
#initialize ⇒ ParamsCorrector
Returns a new instance of ParamsCorrector.
11 12 13 |
# File 'lib/params_corrector.rb', line 11 def initialize @params end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
9 10 11 |
# File 'lib/params_corrector.rb', line 9 def params @params end |
Instance Method Details
#corrected_params(params) ⇒ Object
15 16 17 18 19 |
# File 'lib/params_corrector.rb', line 15 def corrected_params(params) init_params(params) params_correction! self.params end |
#init_params(params) ⇒ Object
21 22 23 |
# File 'lib/params_corrector.rb', line 21 def init_params(params) self.params = params end |