mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 19:05:32 -04:00
Fix linter issues
This commit is contained in:
parent
0ed565519b
commit
f18f6a5418
@ -15,11 +15,9 @@ abstract class Entry
|
|||||||
|
|
||||||
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
|
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
|
||||||
# TODO: check node? and select proper subclass
|
# TODO: check node? and select proper subclass
|
||||||
begin
|
ZippedEntry.new ctx, node
|
||||||
ZippedEntry.new ctx, node
|
rescue e
|
||||||
rescue e
|
DirectoryEntry.new ctx, node
|
||||||
DirectoryEntry.new ctx, node
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_json(*, slim = false)
|
def build_json(*, slim = false)
|
||||||
@ -391,9 +389,9 @@ class DirectoryEntry < Entry
|
|||||||
end
|
end
|
||||||
@id = id
|
@id = id
|
||||||
|
|
||||||
mtimes = sorted_files.map { |file_path| File.info(file_path).modification_time }
|
@mtime = sorted_files.map do |file_path|
|
||||||
@mtime = mtimes.max
|
File.info(file_path).modification_time
|
||||||
|
end.max
|
||||||
@pages = sorted_files.size
|
@pages = sorted_files.size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user