Module: Chromedriver::Binary::SystemHelper
- Included in:
- ChromedriverDownloader, Finder, VersionResolver
- Defined in:
- lib/chromedriver/binary/system_helper.rb
Instance Method Summary collapse
Instance Method Details
#call(process, arg = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/chromedriver/binary/system_helper.rb', line 8 def call(process, arg = nil) cmd = arg ? [process, arg] : process Chromedriver::Binary.logger.debug "making System call: #{cmd}" output, status = capture(*cmd) raise "Failed to make system call: #{cmd}" unless status.success? Chromedriver::Binary.logger.debug "System call returned: #{output}" output end |
#exists?(file) ⇒ Boolean
20 21 22 23 24 |
# File 'lib/chromedriver/binary/system_helper.rb', line 20 def exists?(file) File.exist?(file).tap do |result| Chromedriver::Binary.logger.debug "#{file} is#{" not" unless result} already downloaded" end end |