mirror of
https://github.com/hkalexling/Mango.git
synced 2026-05-01 00:00:55 -04:00
Fix Entry.new in YAML::Serializable to support DirectyEntry
so hacky
This commit is contained in:
@@ -14,7 +14,11 @@ 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
|
||||||
ZippedEntry.new ctx, node
|
begin
|
||||||
|
ZippedEntry.new ctx, node
|
||||||
|
rescue e
|
||||||
|
DirectoryEntry.new ctx, node
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_json(*, slim = false)
|
def build_json(*, slim = false)
|
||||||
|
|||||||
Reference in New Issue
Block a user