Class: BusTime::Bulletin

Inherits:
Object
  • Object
show all
Defined in:
lib/bus_time/bulletin.rb

Overview

Service bulletins, including reroutes and stop closures

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/bus_time/bulletin.rb', line 5

def name
  @name
end

#subjectObject (readonly)

Returns the value of attribute subject.



5
6
7
# File 'lib/bus_time/bulletin.rb', line 5

def subject
  @subject
end

#updated_atObject (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

#urlObject (readonly)

Returns the value of attribute url.



5
6
7
# File 'lib/bus_time/bulletin.rb', line 5

def url
  @url
end