Class: AltFlights::Flight

Inherits:
Object
  • Object
show all
Defined in:
lib/altflights/flight.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#airlineObject

Returns the value of attribute airline.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def airline
  @airline
end

#arrival_timeObject

Returns the value of attribute arrival_time.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def arrival_time
  @arrival_time
end

#cabinObject

Returns the value of attribute cabin.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def cabin
  @cabin
end

#departure_timeObject

Returns the value of attribute departure_time.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def departure_time
  @departure_time
end

#destinationObject

Returns the value of attribute destination.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def destination
  @destination
end

#durationObject

Returns the value of attribute duration.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def duration
  @duration
end

#equipmentObject

Returns the value of attribute equipment.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def equipment
  @equipment
end

#flightObject

Returns the value of attribute flight.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def flight
  @flight
end

#flightcaster_idObject

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_sixtyObject

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_twentyObject

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

#milesObject

Returns the value of attribute miles.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def miles
  @miles
end

#more_than_sixtyObject

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

#originObject

Returns the value of attribute origin.



3
4
5
# File 'lib/altflights/flight.rb', line 3

def origin
  @origin
end

#prediction_statusObject

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