Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- lib/cem/ccommon.rb
Class Method Summary collapse
-
.exist_first?(*candidates) ⇒ Boolean
Returns the first match of the given files.
Class Method Details
.exist_first?(*candidates) ⇒ Boolean
Returns the first match of the given files
49 50 51 52 53 54 55 56 |
# File 'lib/cem/ccommon.rb', line 49 def self.exist_first?(*candidates) candidates.each { |candidate| if File.exist?(candidate) return candidate end } return nil end |