Class: AltFlights::Flight
- Inherits:
-
Object
- Object
- AltFlights::Flight
- Defined in:
- lib/altflights/flight.rb
Instance Attribute Summary collapse
-
#airline ⇒ Object
Returns the value of attribute airline.
-
#arrival_time ⇒ Object
Returns the value of attribute arrival_time.
-
#cabin ⇒ Object
Returns the value of attribute cabin.
-
#departure_time ⇒ Object
Returns the value of attribute departure_time.
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#equipment ⇒ Object
Returns the value of attribute equipment.
-
#flight ⇒ Object
Returns the value of attribute flight.
-
#flightcaster_id ⇒ Object
Returns the value of attribute flightcaster_id.
-
#less_than_sixty ⇒ Object
Returns the value of attribute less_than_sixty.
-
#less_than_twenty ⇒ Object
Returns the value of attribute less_than_twenty.
-
#miles ⇒ Object
Returns the value of attribute miles.
-
#more_than_sixty ⇒ Object
Returns the value of attribute more_than_sixty.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#prediction_status ⇒ Object
Returns the value of attribute prediction_status.
Instance Method Summary collapse
Instance Attribute Details
#airline ⇒ Object
Returns the value of attribute airline.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def airline @airline end |
#arrival_time ⇒ Object
Returns the value of attribute arrival_time.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def arrival_time @arrival_time end |
#cabin ⇒ Object
Returns the value of attribute cabin.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def cabin @cabin end |
#departure_time ⇒ Object
Returns the value of attribute departure_time.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def departure_time @departure_time end |
#destination ⇒ Object
Returns the value of attribute destination.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def destination @destination end |
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def duration @duration end |
#equipment ⇒ Object
Returns the value of attribute equipment.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def equipment @equipment end |
#flight ⇒ Object
Returns the value of attribute flight.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def flight @flight end |
#flightcaster_id ⇒ Object
Returns the value of attribute flightcaster_id.
4 5 6 |
# File 'lib/altflights/flight.rb', line 4 def flightcaster_id @flightcaster_id end |
#less_than_sixty ⇒ Object
Returns the value of attribute less_than_sixty.
4 5 6 |
# File 'lib/altflights/flight.rb', line 4 def less_than_sixty @less_than_sixty end |
#less_than_twenty ⇒ Object
Returns the value of attribute less_than_twenty.
4 5 6 |
# File 'lib/altflights/flight.rb', line 4 def less_than_twenty @less_than_twenty end |
#miles ⇒ Object
Returns the value of attribute miles.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def miles @miles end |
#more_than_sixty ⇒ Object
Returns the value of attribute more_than_sixty.
4 5 6 |
# File 'lib/altflights/flight.rb', line 4 def more_than_sixty @more_than_sixty end |
#origin ⇒ Object
Returns the value of attribute origin.
3 4 5 |
# File 'lib/altflights/flight.rb', line 3 def origin @origin end |
#prediction_status ⇒ Object
Returns the value of attribute prediction_status.
4 5 6 |
# File 'lib/altflights/flight.rb', line 4 def prediction_status @prediction_status end |
Instance Method Details
#add_prediction(status, on_time, less_than_60, more_than_60) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/altflights/flight.rb', line 6 def add_prediction(status, on_time, less_than_60, more_than_60) self.prediction_status = status self.less_than_twenty = on_time self.less_than_sixty = less_than_60 self.more_than_sixty = more_than_60 end |