class Object
Constants
- NETWORKABLE_EXCEPTIONS
Public Instance Methods
check_data(x, y)
click to toggle source
# File lib/phenoscaperb/utils.rb, line 19 def check_data(x, y) if len2(x) == 1 testdata = [x] else testdata = x end for z in testdata if !y.include? z raise z + ' is not one of the choices' end end end
len2(x)
click to toggle source
# File lib/phenoscaperb/utils.rb, line 33 def len2(x) if x.class == String return [x].length else return x.length end end
make_ua()
click to toggle source
# File lib/phenoscaperb/utils.rb, line 1 def make_ua requa = 'Faraday/v' + Faraday::VERSION habua = 'Phenoscaperb/v' + Phenoscape::VERSION return requa + ' ' + habua end
stop(x)
click to toggle source
# File lib/phenoscaperb/utils.rb, line 41 def stop(x) raise ArgumentError, x end