Class: Ns::TravelOption

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/ns/travel_option.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

#initialize

Instance Attribute Details

#actual_arrivalObject

Returns the value of attribute actual_arrival.



5
6
7
# File 'lib/ns/travel_option.rb', line 5

def actual_arrival
  @actual_arrival
end

#actual_departureObject

Returns the value of attribute actual_departure.



5
6
7
# File 'lib/ns/travel_option.rb', line 5

def actual_departure
  @actual_departure
end

#changesObject

Returns the value of attribute changes.



5
6
7
# File 'lib/ns/travel_option.rb', line 5

def changes
  @changes
end

#optimalObject

Returns the value of attribute optimal.



5
6
7
# File 'lib/ns/travel_option.rb', line 5

def optimal
  @optimal
end

#planned_arrivalObject

Returns the value of attribute planned_arrival.



5
6
7
# File 'lib/ns/travel_option.rb', line 5

def planned_arrival
  @planned_arrival
end

#planned_departureObject

Returns the value of attribute planned_departure.



5
6
7
# File 'lib/ns/travel_option.rb', line 5

def planned_departure
  @planned_departure
end

#platformObject

Returns the value of attribute platform.



5
6
7
# File 'lib/ns/travel_option.rb', line 5

def platform
  @platform
end

Instance Method Details

#actual_durationObject



13
14
15
# File 'lib/ns/travel_option.rb', line 13

def actual_duration
  duration(actual_arrival, actual_departure)
end

#delayObject



17
18
19
# File 'lib/ns/travel_option.rb', line 17

def delay
  duration(actual_departure, planned_departure)
end

#planned_durationObject



9
10
11
# File 'lib/ns/travel_option.rb', line 9

def planned_duration
  duration(planned_arrival, planned_departure)
end