Class: MBTA::HeavyRail::Announcements::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/mbta/heavy_rail/announcements/base.rb

Direct Known Subclasses

Arrival, Prediction

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(trip, platform, time) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
# File 'lib/mbta/heavy_rail/announcements/base.rb', line 7

def initialize(trip, platform, time)
  @trip = trip
  @platform = platform
  @time = time
end

Instance Attribute Details

#platformObject (readonly)

Returns the value of attribute platform.



5
6
7
# File 'lib/mbta/heavy_rail/announcements/base.rb', line 5

def platform
  @platform
end

#timeObject (readonly)

Returns the value of attribute time.



5
6
7
# File 'lib/mbta/heavy_rail/announcements/base.rb', line 5

def time
  @time
end

#tripObject (readonly)

Returns the value of attribute trip.



5
6
7
# File 'lib/mbta/heavy_rail/announcements/base.rb', line 5

def trip
  @trip
end

Instance Method Details

#typeObject



13
14
15
# File 'lib/mbta/heavy_rail/announcements/base.rb', line 13

def type
  self.class.name.split('::').last.downcase.to_sym
end