Prior to this PR you would create a custom type and call BakedFileSystem.load(path) from that types scope. This would extend BakedFileSystem and add baked files (created from local folder path) to the file system.
With this PR, you need to exlicitly extend the custom type from BakedFileSystem. This extension adds macros and class methods for baking a folder or a specific file to the type scope:
# previously:
class MyFileSystem
BakedFileSystem.load("path/to/folder")
end
# now:
class MyFileSystem
extend BakedFileSystem
bake_folder "path/to/folder"
end
This is a breaking change, but IMHO it's very much worth it. It allows adding files from multiple folders and as well custom BakedFile instances using bake_file. While being a bit more characters, it makes it explicit that MyFileSystem extends BakedFileSystem - which was previously hidden by BakedFileSystem.load. This makes things more transparent.
Prior to this PR you would create a custom type and call
BakedFileSystem.load(path)
from that types scope. This would extendBakedFileSystem
and add baked files (created from local folder path) to the file system.With this PR, you need to exlicitly extend the custom type from
BakedFileSystem
. This extension adds macros and class methods for baking a folder or a specific file to the type scope:This is a breaking change, but IMHO it's very much worth it. It allows adding files from multiple folders and as well custom
BakedFile
instances usingbake_file
. While being a bit more characters, it makes it explicit thatMyFileSystem
extendsBakedFileSystem
- which was previously hidden byBakedFileSystem.load
. This makes things more transparent.