Class: LIBUSB::Version
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- LIBUSB::Version
- Defined in:
- lib/libusb/version_struct.rb
Instance Method Summary collapse
-
#describe ⇒ Object
For ABI compatibility only.
- #inspect ⇒ Object
-
#major ⇒ Object
Library major version.
-
#micro ⇒ Object
Library micro version.
-
#minor ⇒ Object
Library minor version.
-
#nano ⇒ Object
Library nano version.
-
#rc ⇒ Object
Library release candidate suffix string, e.g.
-
#to_s ⇒ Object
Version string, e.g.
Instance Method Details
#describe ⇒ Object
For ABI compatibility only.
50 51 52 |
# File 'lib/libusb/version_struct.rb', line 50 def describe self[:describe].read_string end |
#inspect ⇒ Object
59 60 61 |
# File 'lib/libusb/version_struct.rb', line 59 def inspect "\#<#{self.class} #{to_s}>" end |
#major ⇒ Object
Library major version.
28 29 30 |
# File 'lib/libusb/version_struct.rb', line 28 def major self[:major] end |
#micro ⇒ Object
Library micro version.
36 37 38 |
# File 'lib/libusb/version_struct.rb', line 36 def micro self[:micro] end |
#minor ⇒ Object
Library minor version.
32 33 34 |
# File 'lib/libusb/version_struct.rb', line 32 def minor self[:minor] end |
#nano ⇒ Object
Library nano version.
40 41 42 |
# File 'lib/libusb/version_struct.rb', line 40 def nano self[:nano] end |
#rc ⇒ Object
Library release candidate suffix string, e.g. “-rc4”.
45 46 47 |
# File 'lib/libusb/version_struct.rb', line 45 def rc self[:rc].read_string end |
#to_s ⇒ Object
Version string, e.g. “1.2.3-rc4”
55 56 57 |
# File 'lib/libusb/version_struct.rb', line 55 def to_s "#{major}.#{minor}.#{micro}#{rc}" end |