Class: SJCBusSchedule::Bus

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#directionObject (readonly)

Returns the value of attribute direction.



4
5
6
# File 'lib/sjc_bus_schedule/bus.rb', line 4

def direction
  @direction
end

#itineraryObject (readonly)

Returns the value of attribute itinerary.



4
5
6
# File 'lib/sjc_bus_schedule/bus.rb', line 4

def itinerary
  @itinerary
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/sjc_bus_schedule/bus.rb', line 4

def name
  @name
end

#noteObject (readonly)

Returns the value of attribute note.



4
5
6
# File 'lib/sjc_bus_schedule/bus.rb', line 4

def note
  @note
end

#numberObject (readonly)

Returns the value of attribute number.



4
5
6
# File 'lib/sjc_bus_schedule/bus.rb', line 4

def number
  @number
end

#schedulesObject (readonly)

Returns the value of attribute schedules.



4
5
6
# File 'lib/sjc_bus_schedule/bus.rb', line 4

def schedules
  @schedules
end