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.
407 408 409 |
# File 'lib/ffi/clang/lib/cursor.rb', line 407 def major self[:major] end |
#minor ⇒ Object
Get the minor version number.
413 414 415 |
# File 'lib/ffi/clang/lib/cursor.rb', line 413 def minor self[:minor] end |
#subminor ⇒ Object
Get the subminor version number.
419 420 421 |
# File 'lib/ffi/clang/lib/cursor.rb', line 419 def subminor self[:subminor] end |
#to_s ⇒ Object
Convert to a string representation.
431 432 433 |
# File 'lib/ffi/clang/lib/cursor.rb', line 431 def to_s version_string end |
#version_string ⇒ Object
Get the version as a string.
425 426 427 |
# File 'lib/ffi/clang/lib/cursor.rb', line 425 def version_string [major, minor, subminor].reject{|v| v < 0}.map(&:to_s).join(".") end |