2017-08-06 05:36:15 -07:00
|
|
|
module Vrobot4
|
2017-08-11 15:16:16 -07:00
|
|
|
Version = "4.00".freeze
|
2017-08-06 05:36:15 -07:00
|
|
|
|
2017-08-06 16:27:36 -07:00
|
|
|
@@debug = 0
|
|
|
|
def self.debug= set; @@debug = set; end
|
|
|
|
def self.debug ; @@debug; end
|
2017-08-06 05:36:15 -07:00
|
|
|
|
|
|
|
def self.log lv, *text
|
2017-08-06 16:27:36 -07:00
|
|
|
if (lv != :DEBUG || @@debug >= 1) &&
|
|
|
|
(lv != :DEBUGV || @@debug >= 2)
|
|
|
|
puts "[" + lv.to_s.ljust(6) + "] " + text.join(" ")
|
2017-08-11 15:16:16 -07:00
|
|
|
true
|
|
|
|
else
|
|
|
|
false
|
2017-08-06 05:36:15 -07:00
|
|
|
end
|
|
|
|
end
|
2017-08-08 01:35:20 -07:00
|
|
|
|
2017-08-11 15:16:16 -07:00
|
|
|
def self.is_num? str
|
|
|
|
/\A[-+]?[0-9]*\.?[0-9]+\Z/ === str
|
2017-08-08 01:35:20 -07:00
|
|
|
end
|
2017-08-06 05:36:15 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
## EOF
|