class Bindgen::FindPath::VersionChecker

Overview

Checker for a VersionCheck. This is a special checker. It can't be instantiated in the PathConfig#checks array, but only through PathConfig#version.

Defined in:

bindgen/find_path/version_checker.cr

Constant Summary

HIGHEST_POSSIBLE = "~"
LOWEST_POSSIBLE = " "

Constructors

Instance Method Summary

Instance methods inherited from class Bindgen::FindPath::Checker

check(path : String) : Bool check

Constructor methods inherited from class Bindgen::FindPath::Checker

create(config, is_file) : Checker create

Constructor Detail

def self.new(config : VersionCheck) #

[View source]

Instance Method Detail

def best_candidate : String | Nil #

Returns the best checked candidate


[View source]
def candidates : Array({String, String}) #

Stores all candidates


[View source]
def check(path : String) : Bool #

Checks path by calling out to the configured shell command, expanding path into it. STDOUT is hidden, but STDERR is shown. Only succeeds if the command returned exit code 0.


[View source]
def sorted_candidates : Array(Tuple(String, String)) #

Returns the list of sorted candidates, from the best candidate first down to worse candidates.


[View source]