Class: Fontist::Import::Otfinfo::OtfinfoRequirement
- Inherits:
-
Object
- Object
- Fontist::Import::Otfinfo::OtfinfoRequirement
- Defined in:
- lib/fontist/import/otfinfo/otfinfo_requirement.rb
Instance Method Summary collapse
- #call(path) ⇒ Object
-
#initialize ⇒ OtfinfoRequirement
constructor
A new instance of OtfinfoRequirement.
Constructor Details
#initialize ⇒ OtfinfoRequirement
Returns a new instance of OtfinfoRequirement.
7 8 9 10 11 12 13 14 |
# File 'lib/fontist/import/otfinfo/otfinfo_requirement.rb', line 7 def initialize otfinfo_path = `which otfinfo` if otfinfo_path.empty? abort "otfinfo is not available. (Or is PATH not setup properly?)"\ " You must install otfinfo."\ " On macOS it can be installed via `brew install lcdf-typetools`." end end |
Instance Method Details
#call(path) ⇒ Object
16 17 18 |
# File 'lib/fontist/import/otfinfo/otfinfo_requirement.rb', line 16 def call(path) Helpers::SystemHelper.run("otfinfo --info '#{path}'") end |