Class: SJCBusSchedule::Bus
- Inherits:
-
Object
- Object
- SJCBusSchedule::Bus
- Defined in:
- lib/sjc_bus_schedule/bus.rb
Instance Attribute Summary collapse
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#itinerary ⇒ Object
readonly
Returns the value of attribute itinerary.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#note ⇒ Object
readonly
Returns the value of attribute note.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#schedules ⇒ Object
readonly
Returns the value of attribute schedules.
Instance Method Summary collapse
-
#initialize(number:, name:, direction:, itinerary:, note:, schedules:) ⇒ Bus
constructor
A new instance of Bus.
Constructor Details
#initialize(number:, name:, direction:, itinerary:, note:, schedules:) ⇒ Bus
Returns a new instance of Bus.
6 7 8 9 10 11 12 13 |
# File 'lib/sjc_bus_schedule/bus.rb', line 6 def initialize(number:, name:, direction:, itinerary:, note:, schedules:) @number = number @name = name @direction = direction @itinerary = itinerary @note = note @schedules = schedules end |
Instance Attribute Details
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
4 5 6 |
# File 'lib/sjc_bus_schedule/bus.rb', line 4 def direction @direction end |
#itinerary ⇒ Object (readonly)
Returns the value of attribute itinerary.
4 5 6 |
# File 'lib/sjc_bus_schedule/bus.rb', line 4 def itinerary @itinerary end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/sjc_bus_schedule/bus.rb', line 4 def name @name end |
#note ⇒ Object (readonly)
Returns the value of attribute note.
4 5 6 |
# File 'lib/sjc_bus_schedule/bus.rb', line 4 def note @note end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
4 5 6 |
# File 'lib/sjc_bus_schedule/bus.rb', line 4 def number @number end |
#schedules ⇒ Object (readonly)
Returns the value of attribute schedules.
4 5 6 |
# File 'lib/sjc_bus_schedule/bus.rb', line 4 def schedules @schedules end |