class SDL2::Version
Used to identify linked versions of libraries. Used by SDL2
, SDL_Image, SDL_ttf, and etc.
Public Class Methods
release(pointer)
click to toggle source
Release memory held by a Version
struct
# File lib/sdl2/version.rb, line 13 def self.release(pointer) pointer.free end
Public Instance Methods
major()
click to toggle source
The major X.0.0 part
# File lib/sdl2/version.rb, line 18 def major self[:major] end
minor()
click to toggle source
The minor 0.X.0 part
# File lib/sdl2/version.rb, line 23 def minor self[:minor] end
patch()
click to toggle source
the patch 0.0.X part
# File lib/sdl2/version.rb, line 28 def patch self[:patch] end
to_s()
click to toggle source
Human-readable version string
# File lib/sdl2/version.rb, line 33 def to_s "v#{major}.#{minor}.#{patch}" end