Class: Renamr::OmitAction
Overview
Omits file names shorter than limit.
Instance Method Summary collapse
- #do(src) ⇒ Object
-
#initialize(lim) ⇒ OmitAction
constructor
A new instance of OmitAction.
Methods inherited from Action
Constructor Details
#initialize(lim) ⇒ OmitAction
Returns a new instance of OmitAction.
11 12 13 14 15 |
# File 'lib/renamr/omit.rb', line 11 def initialize(lim) raise 'lim cannot be nil.' if lim.nil? @lim = lim end |
Instance Method Details
#do(src) ⇒ Object
17 18 19 |
# File 'lib/renamr/omit.rb', line 17 def do(src) src.length < @lim ? nil : src end |