Sha256: 956f2b0517d38d0ec2af2002f160ba5b5dce6259c1fb3f3b1ee66d14e274435c
Contents?: true
Size: 538 Bytes
Versions: 3
Compression:
Stored size: 538 Bytes
Contents
# -*- coding: utf-8 -*- # # 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 DontConneting, stderr.strip end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
narou-2.9.2 | lib/device/library/mac.rb |
narou-2.9.1 | lib/device/library/mac.rb |
narou-2.9.0 | lib/device/library/mac.rb |