From 44a6f822cd2d69156beb359dfa26b522f47e875d Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Wed, 15 Sep 2021 09:00:30 +0000 Subject: [PATCH] Simplify Title.new --- src/library/title.cr | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/library/title.cr b/src/library/title.cr index 3abc38d..ee1edd0 100644 --- a/src/library/title.cr +++ b/src/library/title.cr @@ -19,7 +19,7 @@ class Title @[YAML::Field(ignore: true)] @cached_cover_url : String? - def initialize(@dir : String, @parent_id, cache : Hash(String, String)?) + def initialize(@dir : String, @parent_id, cache : Hash(String, String)? = nil) storage = Storage.default @signature = Dir.signature dir id = storage.get_title_id dir, signature @@ -70,10 +70,6 @@ class Title end end - def self.new(dir : String, parent_id) - new dir, parent_id, nil - end - def examine(context : ExamineContext) : Bool return false unless Dir.exists? @dir # No title, Remove this contents_signature = Dir.contents_signature @dir,