Class: MultiVideoStreaming::Helpers::SortFilesArrayByLabel
- Inherits:
-
Object
- Object
- MultiVideoStreaming::Helpers::SortFilesArrayByLabel
- Defined in:
- lib/multi_video_streaming/helpers/sort_files_array_by_label.rb
Class Method Summary collapse
Class Method Details
.sort(array:) ⇒ Object
6 7 8 |
# File 'lib/multi_video_streaming/helpers/sort_files_array_by_label.rb', line 6 def self.sort(array:) array.sort! { |lastFile, nextFile| /[\d]+/.match(nextFile[:label])[0].to_i <=> /[\d]+/.match(lastFile[:label])[0].to_i } end |