Module: Arrolio::DataDir
- Defined in:
- lib/arrolio/data_dir.rb
Constant Summary collapse
- DELIMITER =
'/'
Class Method Summary collapse
Class Method Details
.afm(name) ⇒ Object
19 20 21 |
# File 'lib/arrolio/data_dir.rb', line 19 def afm(name) File.join(root, 'afm', "#{name}.afm") end |
.glyphlist ⇒ Object
23 24 25 |
# File 'lib/arrolio/data_dir.rb', line 23 def glyphlist File.join(root, 'glyphlist.txt') end |
.resolve(*segments) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/arrolio/data_dir.rb', line 12 def resolve(*segments) path = File.join(root, *segments) raise Arrolio::Error, "missing data file: #{segments.join(DELIMITER)}" unless File.exist?(path) path end |
.root ⇒ Object
8 9 10 |
# File 'lib/arrolio/data_dir.rb', line 8 def root File.('../../data/arrolio', __dir__) end |