Class: Transport::Section
- Inherits:
-
Object
- Object
- Transport::Section
- Defined in:
- lib/section.rb
Instance Attribute Summary collapse
-
#arrival ⇒ Object
readonly
Returns the value of attribute arrival.
-
#departure ⇒ Object
readonly
Returns the value of attribute departure.
-
#journey ⇒ Object
readonly
Returns the value of attribute journey.
-
#walk ⇒ Object
readonly
Returns the value of attribute walk.
Instance Method Summary collapse
-
#initialize(section) ⇒ Section
constructor
A new instance of Section.
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
#arrival ⇒ Object (readonly)
Returns the value of attribute arrival.
7 8 9 |
# File 'lib/section.rb', line 7 def arrival @arrival end |
#departure ⇒ Object (readonly)
Returns the value of attribute departure.
7 8 9 |
# File 'lib/section.rb', line 7 def departure @departure end |
#journey ⇒ Object (readonly)
Returns the value of attribute journey.
7 8 9 |
# File 'lib/section.rb', line 7 def journey @journey end |
#walk ⇒ Object (readonly)
Returns the value of attribute walk.
7 8 9 |
# File 'lib/section.rb', line 7 def walk @walk end |