Class: Fontist::Import::Otfinfo::OtfinfoRequirement

Inherits:
Object
  • Object
show all
Defined in:
lib/fontist/import/otfinfo/otfinfo_requirement.rb

Instance Method Summary collapse

Constructor Details

#initializeOtfinfoRequirement

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