Class: BusTime::Bulletin
- Inherits:
-
Object
- Object
- BusTime::Bulletin
- Defined in:
- lib/bus_time/bulletin.rb
Overview
Service bulletins, including reroutes and stop closures
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(name, subject, affected, updated_at, **opts) ⇒ Bulletin
constructor
A new instance of Bulletin.
Constructor Details
#initialize(name, subject, affected, updated_at, **opts) ⇒ Bulletin
Returns a new instance of Bulletin.
7 8 9 10 11 12 13 |
# File 'lib/bus_time/bulletin.rb', line 7 def initialize(name, subject, affected, updated_at, **opts) @name = name @subject = subject @affected = affected @updated_at = updated_at @url = opts[:url] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/bus_time/bulletin.rb', line 5 def name @name end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
5 6 7 |
# File 'lib/bus_time/bulletin.rb', line 5 def subject @subject end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
5 6 7 |
# File 'lib/bus_time/bulletin.rb', line 5 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/bus_time/bulletin.rb', line 5 def url @url end |