Class: Vatsim::Prefile
- Inherits:
-
Object
- Object
- Vatsim::Prefile
- Defined in:
- lib/vatsim/prefile.rb
Overview
Prefiled clients
Instance Attribute Summary collapse
-
#callsign ⇒ Object
readonly
Returns the value of attribute callsign.
-
#cid ⇒ Object
readonly
Returns the value of attribute cid.
-
#planned_actdeptime ⇒ Object
readonly
Returns the value of attribute planned_actdeptime.
-
#planned_aircraft ⇒ Object
readonly
Returns the value of attribute planned_aircraft.
-
#planned_altairport ⇒ Object
readonly
Returns the value of attribute planned_altairport.
-
#planned_altitude ⇒ Object
readonly
Returns the value of attribute planned_altitude.
-
#planned_depairport ⇒ Object
readonly
Returns the value of attribute planned_depairport.
-
#planned_depairport_lat ⇒ Object
readonly
Returns the value of attribute planned_depairport_lat.
-
#planned_depairport_lon ⇒ Object
readonly
Returns the value of attribute planned_depairport_lon.
-
#planned_deptime ⇒ Object
readonly
Returns the value of attribute planned_deptime.
-
#planned_destairport ⇒ Object
readonly
Returns the value of attribute planned_destairport.
-
#planned_destairport_lat ⇒ Object
readonly
Returns the value of attribute planned_destairport_lat.
-
#planned_destairport_lon ⇒ Object
readonly
Returns the value of attribute planned_destairport_lon.
-
#planned_flighttype ⇒ Object
readonly
Returns the value of attribute planned_flighttype.
-
#planned_hrsenroute ⇒ Object
readonly
Returns the value of attribute planned_hrsenroute.
-
#planned_hrsfuel ⇒ Object
readonly
Returns the value of attribute planned_hrsfuel.
-
#planned_minenroute ⇒ Object
readonly
Returns the value of attribute planned_minenroute.
-
#planned_minfuel ⇒ Object
readonly
Returns the value of attribute planned_minfuel.
-
#planned_remarks ⇒ Object
readonly
Returns the value of attribute planned_remarks.
-
#planned_revision ⇒ Object
readonly
Returns the value of attribute planned_revision.
-
#planned_route ⇒ Object
readonly
Returns the value of attribute planned_route.
-
#planned_tascruise ⇒ Object
readonly
Returns the value of attribute planned_tascruise.
-
#realname ⇒ Object
readonly
Returns the value of attribute realname.
Instance Method Summary collapse
-
#initialize(line) ⇒ Prefile
constructor
A new instance of Prefile.
Constructor Details
#initialize(line) ⇒ Prefile
Returns a new instance of Prefile.
6 7 8 9 10 11 12 13 14 |
# File 'lib/vatsim/prefile.rb', line 6 def initialize line attributes = [:callsign, :cid, :realname, :clienttype, :frequency, :latitude, :longitude, :altitude, :groundspeed, :planned_aircraft, :planned_tascruise, :planned_depairport, :planned_altitude, :planned_destairport, :server, :protrevision, :rating, :transponder, :facilitytype, :visualrange, :planned_revision, :planned_flighttype, :planned_deptime, :planned_actdeptime, :planned_hrsenroute, :planned_minenroute, :planned_hrsfuel, :planned_minfuel, :planned_altairport, :planned_remarks, :planned_route, :planned_depairport_lat, :planned_depairport_lon, :planned_destairport_lat, :planned_destairport_lon, :atis_message, :time_last_atis_received, :time_logon, :heading, :QNH_iHg, :QNH_Mb] line_split = line.split(":") attributes.each_with_index.map { |attribute, index| instance_variable_set("@#{attribute}", line_split[index]) if self.respond_to?(attribute) } end |
Instance Attribute Details
#callsign ⇒ Object (readonly)
Returns the value of attribute callsign.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def callsign @callsign end |
#cid ⇒ Object (readonly)
Returns the value of attribute cid.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def cid @cid end |
#planned_actdeptime ⇒ Object (readonly)
Returns the value of attribute planned_actdeptime.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_actdeptime @planned_actdeptime end |
#planned_aircraft ⇒ Object (readonly)
Returns the value of attribute planned_aircraft.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_aircraft @planned_aircraft end |
#planned_altairport ⇒ Object (readonly)
Returns the value of attribute planned_altairport.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_altairport @planned_altairport end |
#planned_altitude ⇒ Object (readonly)
Returns the value of attribute planned_altitude.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_altitude @planned_altitude end |
#planned_depairport ⇒ Object (readonly)
Returns the value of attribute planned_depairport.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_depairport @planned_depairport end |
#planned_depairport_lat ⇒ Object (readonly)
Returns the value of attribute planned_depairport_lat.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_depairport_lat @planned_depairport_lat end |
#planned_depairport_lon ⇒ Object (readonly)
Returns the value of attribute planned_depairport_lon.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_depairport_lon @planned_depairport_lon end |
#planned_deptime ⇒ Object (readonly)
Returns the value of attribute planned_deptime.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_deptime @planned_deptime end |
#planned_destairport ⇒ Object (readonly)
Returns the value of attribute planned_destairport.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_destairport @planned_destairport end |
#planned_destairport_lat ⇒ Object (readonly)
Returns the value of attribute planned_destairport_lat.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_destairport_lat @planned_destairport_lat end |
#planned_destairport_lon ⇒ Object (readonly)
Returns the value of attribute planned_destairport_lon.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_destairport_lon @planned_destairport_lon end |
#planned_flighttype ⇒ Object (readonly)
Returns the value of attribute planned_flighttype.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_flighttype @planned_flighttype end |
#planned_hrsenroute ⇒ Object (readonly)
Returns the value of attribute planned_hrsenroute.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_hrsenroute @planned_hrsenroute end |
#planned_hrsfuel ⇒ Object (readonly)
Returns the value of attribute planned_hrsfuel.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_hrsfuel @planned_hrsfuel end |
#planned_minenroute ⇒ Object (readonly)
Returns the value of attribute planned_minenroute.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_minenroute @planned_minenroute end |
#planned_minfuel ⇒ Object (readonly)
Returns the value of attribute planned_minfuel.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_minfuel @planned_minfuel end |
#planned_remarks ⇒ Object (readonly)
Returns the value of attribute planned_remarks.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_remarks @planned_remarks end |
#planned_revision ⇒ Object (readonly)
Returns the value of attribute planned_revision.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_revision @planned_revision end |
#planned_route ⇒ Object (readonly)
Returns the value of attribute planned_route.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_route @planned_route end |
#planned_tascruise ⇒ Object (readonly)
Returns the value of attribute planned_tascruise.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def planned_tascruise @planned_tascruise end |
#realname ⇒ Object (readonly)
Returns the value of attribute realname.
4 5 6 |
# File 'lib/vatsim/prefile.rb', line 4 def realname @realname end |