Class: Tnef::Executable
- Inherits:
-
Object
- Object
- Tnef::Executable
- Defined in:
- lib/tnef/executable.rb
Class Method Summary collapse
Class Method Details
.installed? ⇒ Boolean
21 22 23 |
# File 'lib/tnef/executable.rb', line 21 def self.installed? !path.nil? end |
.path ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/tnef/executable.rb', line 5 def self.path return @path if defined?(@path) @path = begin gem_local_path = File.('../../ext/tnef/bin/tnef', File.dirname(__FILE__)) if File.executable?(gem_local_path) gem_local_path elsif other_path = system('which tnef > /dev/null') `which tnef`.strip else nil end end end |