Class: GObjectIntrospection::Lib::VersionGuesser
- Inherits:
-
Object
- Object
- GObjectIntrospection::Lib::VersionGuesser
- Defined in:
- lib/ffi-gobject_introspection/lib.rb
Overview
Helper class to support guessing the gobject-introspection version. Provide several guesses to #provide_guess, and the result in #best_guess will be the best (i.e., lowest) guess.
Instance Method Summary collapse
- #best_guess ⇒ Object
-
#initialize(base) ⇒ VersionGuesser
constructor
A new instance of VersionGuesser.
- #provide_guess(guessed) ⇒ Object
Constructor Details
#initialize(base) ⇒ VersionGuesser
Returns a new instance of VersionGuesser.
13 14 15 |
# File 'lib/ffi-gobject_introspection/lib.rb', line 13 def initialize(base) @guess = base end |
Instance Method Details
#best_guess ⇒ Object
21 22 23 |
# File 'lib/ffi-gobject_introspection/lib.rb', line 21 def best_guess @guess end |
#provide_guess(guessed) ⇒ Object
17 18 19 |
# File 'lib/ffi-gobject_introspection/lib.rb', line 17 def provide_guess(guessed) @guess = guessed if guessed < @guess end |