lib/vatsim/data.rb
def random_data_url
      url0s = Array.new
      file = File.open(STATUS_FILE_PATH)
      file.each {|line|
        if line.start_with? "url0"
          url0s << line.split("=").last
        end
      }
      return url0s[rand(url0s.length)]
     end
def random_data_url
      url0s = Array.new
      file = File.open(STATUS_FILE_PATH)
      file.each {|line|
        if line.start_with? "url0"
          url0s << line.split("=").last
        end
      }
      return url0s[rand(url0s.length)]
     end
def random_data_url url0s = Array . new file = File . open ( STATUS_FILE_PATH ) file . each { | line | if line . start_with? "url0" url0s << line . split ( "=" ) . last end } return url0s [ rand ( url0s . length ) ] end
Return random vatsim data url from status file
Return random vatsim data url from status file