Module: Textus::Key::Path
- Defined in:
- lib/textus/key/path.rb
Class Method Summary collapse
-
.resolve(manifest, mentry) ⇒ Object
Returns the absolute filesystem path for a manifest entry (the leaf file, not a nested directory).
Class Method Details
.resolve(manifest, mentry) ⇒ Object
Returns the absolute filesystem path for a manifest entry (the leaf file, not a nested directory). Adds the format’s primary extension when the manifest entry’s ‘path:` is extensionless.
7 8 9 10 11 12 13 14 |
# File 'lib/textus/key/path.rb', line 7 def self.resolve(manifest, mentry) primary_ext = Entry.for_format(mentry.format).extensions.first if File.extname(mentry.path) == "" File.join(manifest.root, "zones", mentry.path + primary_ext) else File.join(manifest.root, "zones", mentry.path) end end |