mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -04:00
Use helper function compare_alphanumerically(String, String)
to make
the function call shorter
This commit is contained in:
parent
01216d806c
commit
dc5284968d
@ -45,7 +45,9 @@ class Entry
|
||||
["image/jpeg", "image/png"].includes? \
|
||||
MIME.from_filename? e.filename
|
||||
}
|
||||
.sort { |a, b| compare_alphanumerically(split_by_alphanumeric(a.filename), split_by_alphanumeric(b.filename)) }
|
||||
.sort { |a, b|
|
||||
compare_alphanumerically a.filename, b.filename
|
||||
}
|
||||
.[page_num - 1]
|
||||
page.open do |io|
|
||||
slice = Bytes.new page.uncompressed_size
|
||||
|
Loading…
x
Reference in New Issue
Block a user