Class: FFI::Clang::Lib::CXVersion
- Inherits:
-
Struct
- Object
- Struct
- FFI::Clang::Lib::CXVersion
- Defined in:
- lib/ffi/clang/lib/cursor.rb
Overview
FFI struct representing a version number with major, minor, and subminor components.
Instance Method Summary collapse
-
#major ⇒ Object
Get the major version number.
-
#minor ⇒ Object
Get the minor version number.
-
#subminor ⇒ Object
Get the subminor version number.
-
#to_s ⇒ Object
Convert to a string representation.
-
#version_string ⇒ Object
Get the version as a string.
Instance Method Details
#major ⇒ Object
Get the major version number.
356 357 358 |
# File 'lib/ffi/clang/lib/cursor.rb', line 356 def major self[:major] end |
#minor ⇒ Object
Get the minor version number.
362 363 364 |
# File 'lib/ffi/clang/lib/cursor.rb', line 362 def minor self[:minor] end |
#subminor ⇒ Object
Get the subminor version number.
368 369 370 |
# File 'lib/ffi/clang/lib/cursor.rb', line 368 def subminor self[:subminor] end |
#to_s ⇒ Object
Convert to a string representation.
380 381 382 |
# File 'lib/ffi/clang/lib/cursor.rb', line 380 def to_s version_string end |
#version_string ⇒ Object
Get the version as a string.
374 375 376 |
# File 'lib/ffi/clang/lib/cursor.rb', line 374 def version_string [major, minor, subminor].reject{|v| v < 0}.map(&:to_s).join(".") end |