Class: Ejectable::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/ejectable/device.rb

Overview

Examples:

device = Ejectable::Device.new '/dev/cdrom'
device.eject_tray!

Instance Method Summary collapse

Constructor Details

#initialize(name = DEFAULT_DEVICE_NAME) ⇒ Device


9
10
11
# File 'lib/ejectable/device.rb', line 9

def initialize(name=DEFAULT_DEVICE_NAME)
  @name = name.dup.freeze
end

Instance Method Details

#nameString


14
15
16
# File 'lib/ejectable/device.rb', line 14

def name
  @name.dup
end