Class: Transport::Section

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(section) ⇒ Section

Returns a new instance of Section.



9
10
11
12
13
14
# File 'lib/section.rb', line 9

def initialize(section)
  @journey = Journey.new section['journey']
  @walk = section['walk']
  @departure = Checkpoint.new section['departure']
  @arrival = Checkpoint.new section['arrival']
end

Instance Attribute Details

#arrivalObject (readonly)

Returns the value of attribute arrival.



7
8
9
# File 'lib/section.rb', line 7

def arrival
  @arrival
end

#departureObject (readonly)

Returns the value of attribute departure.



7
8
9
# File 'lib/section.rb', line 7

def departure
  @departure
end

#journeyObject (readonly)

Returns the value of attribute journey.



7
8
9
# File 'lib/section.rb', line 7

def journey
  @journey
end

#walkObject (readonly)

Returns the value of attribute walk.



7
8
9
# File 'lib/section.rb', line 7

def walk
  @walk
end