Class: Pitle::Util
- Inherits:
-
Object
- Object
- Pitle::Util
- Defined in:
- lib/pitle.rb
Class Method Summary collapse
Class Method Details
.divide_extension(filename, extensions) ⇒ Object
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/pitle.rb', line 50 def self.divide_extension(filename, extensions) ret = nil extensions.each do |e| unless filename.rindex(e).nil? ret = [filename.split(".#{e}")[0], e] break end end return ret end |