Class: Interlnk::Packet::DriveInfoAnswer
- Inherits:
-
Object
- Object
- Interlnk::Packet::DriveInfoAnswer
- Defined in:
- lib/interlnk/packet/driveinfo.rb
Instance Attribute Summary collapse
-
#size ⇒ Object
Returns the value of attribute size.
-
#volume_label ⇒ Object
Returns the value of attribute volume_label.
Instance Method Summary collapse
-
#initialize(data) ⇒ DriveInfoAnswer
constructor
A new instance of DriveInfoAnswer.
- #write_protected? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ DriveInfoAnswer
Returns a new instance of DriveInfoAnswer.
8 9 10 11 12 |
# File 'lib/interlnk/packet/driveinfo.rb', line 8 def initialize(data) ( @size, @volume_label, @write_protected ) = data.unpack('Z10Z12C') end |
Instance Attribute Details
#size ⇒ Object
Returns the value of attribute size.
6 7 8 |
# File 'lib/interlnk/packet/driveinfo.rb', line 6 def size @size end |
#volume_label ⇒ Object
Returns the value of attribute volume_label.
6 7 8 |
# File 'lib/interlnk/packet/driveinfo.rb', line 6 def volume_label @volume_label end |
Instance Method Details
#write_protected? ⇒ Boolean
14 15 16 |
# File 'lib/interlnk/packet/driveinfo.rb', line 14 def write_protected? @write_protected != 0 end |