Sha256: 87d454ebac2cc4cdaf4de9de04472fc7f1b69b3b582b0b4740b8cb12e2dd348e
Contents?: true
Size: 549 Bytes
Versions: 25
Compression:
Stored size: 549 Bytes
Contents
# frozen_string_literal: true # # Copyright 2013 whiteleaf. All rights reserved. # module Device::Library module Mac def get_device_root_dir(volume_name) %w(/Volumes).each do |mount_root| path = File.join(mount_root, volume_name) if File.directory?(path) return path end end nil end def eject(volume_name) status, stdio, stderr = systemu("diskutil eject #{volume_name}") unless status.success? raise Device::CantEject, stderr.strip end end end end
Version data entries
25 entries across 25 versions & 1 rubygems