mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 19:05:32 -04:00
Fix Entry.new in YAML::Serializable to support DirectyEntry
so hacky
This commit is contained in:
parent
137e84dfb6
commit
caf4cfb6cd
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user