module Reline::Terminfo
def self.tigetnum(capname)
def self.tigetnum(capname) raise TerminfoError, "capname is not String: #{capname.inspect}" unless capname.is_a?(String) num = @tigetnum.(capname).to_i case num when -2 raise TerminfoError, "not numeric capability: #{capname}" when -1 raise TerminfoError, "can't find capability: #{capname}" end num end