Class: Vatsim::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/vatsim/data.rb

Overview

Stores parsed data from vatsim data format

Constant Summary collapse

STATUS_URL =
"http://status.vatsim.net/status.txt"
STATUS_DOWNLOAD_INTERVAL =

6 hours

60*60*6
DATA_DOWNLOAD_INTERVAL =

2 minutes

60*2
STATUS_FILE_PATH =
Dir::tmpdir + "/vatsim-status.txt"
DATA_FILE_PATH =
Dir::tmpdir + "/vatsim-data.txt"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeData

Returns a new instance of Data.



17
18
19
20
21
22
23
24
25
26
# File 'lib/vatsim/data.rb', line 17

def initialize
  @pilots = Array.new
  @atc = Array.new
  @prefiles = Array.new
  @servers = Array.new
  @voice_servers = Array.new
  @general = Hash.new

  parse
end

Instance Attribute Details

#atcObject (readonly)

Returns the value of attribute atc.



9
10
11
# File 'lib/vatsim/data.rb', line 9

def atc
  @atc
end

#generalObject (readonly)

Returns the value of attribute general.



9
10
11
# File 'lib/vatsim/data.rb', line 9

def general
  @general
end

#pilotsObject (readonly)

Returns the value of attribute pilots.



9
10
11
# File 'lib/vatsim/data.rb', line 9

def pilots
  @pilots
end

#prefilesObject (readonly)

Returns the value of attribute prefiles.



9
10
11
# File 'lib/vatsim/data.rb', line 9

def prefiles
  @prefiles
end

#serversObject (readonly)

Returns the value of attribute servers.



9
10
11
# File 'lib/vatsim/data.rb', line 9

def servers
  @servers
end

#voice_serversObject (readonly)

Returns the value of attribute voice_servers.



9
10
11
# File 'lib/vatsim/data.rb', line 9

def voice_servers
  @voice_servers
end