Class: Vatsim::Data
- Inherits:
-
Object
- Object
- Vatsim::Data
- 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
-
#atc ⇒ Object
readonly
Returns the value of attribute atc.
-
#general ⇒ Object
readonly
Returns the value of attribute general.
-
#pilots ⇒ Object
readonly
Returns the value of attribute pilots.
-
#prefiles ⇒ Object
readonly
Returns the value of attribute prefiles.
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
-
#voice_servers ⇒ Object
readonly
Returns the value of attribute voice_servers.
Instance Method Summary collapse
-
#initialize ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize ⇒ Data
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
#atc ⇒ Object (readonly)
Returns the value of attribute atc.
9 10 11 |
# File 'lib/vatsim/data.rb', line 9 def atc @atc end |
#general ⇒ Object (readonly)
Returns the value of attribute general.
9 10 11 |
# File 'lib/vatsim/data.rb', line 9 def general @general end |
#pilots ⇒ Object (readonly)
Returns the value of attribute pilots.
9 10 11 |
# File 'lib/vatsim/data.rb', line 9 def pilots @pilots end |
#prefiles ⇒ Object (readonly)
Returns the value of attribute prefiles.
9 10 11 |
# File 'lib/vatsim/data.rb', line 9 def prefiles @prefiles end |
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
9 10 11 |
# File 'lib/vatsim/data.rb', line 9 def servers @servers end |
#voice_servers ⇒ Object (readonly)
Returns the value of attribute voice_servers.
9 10 11 |
# File 'lib/vatsim/data.rb', line 9 def voice_servers @voice_servers end |