Class: Fontist::Import::Files::FileRequirement

Inherits:
Object
  • Object
show all
Defined in:
lib/fontist/import/files/file_requirement.rb

Instance Method Summary collapse

Constructor Details

#initializeFileRequirement

Returns a new instance of FileRequirement.



5
6
7
8
9
# File 'lib/fontist/import/files/file_requirement.rb', line 5

def initialize
  `file -v`
rescue Errno::ENOENT
  abort "`file` is not available. (Or is PATH not setup properly?)"
end

Instance Method Details

#call(path) ⇒ Object



11
12
13
# File 'lib/fontist/import/files/file_requirement.rb', line 11

def call(path)
  Helpers::SystemHelper.run("file --brief '#{path}'")
end