Class: Fontist::Import::Files::FileRequirement
- Inherits:
-
Object
- Object
- Fontist::Import::Files::FileRequirement
- Defined in:
- lib/fontist/import/files/file_requirement.rb
Instance Method Summary collapse
- #call(path) ⇒ Object
-
#initialize ⇒ FileRequirement
constructor
A new instance of FileRequirement.
Constructor Details
#initialize ⇒ FileRequirement
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 |