Class: Bort::Schedule::Stop
- Inherits:
-
Object
- Object
- Bort::Schedule::Stop
- Defined in:
- lib/bort/schedule.rb
Instance Attribute Summary collapse
-
#bike_flag ⇒ Object
Returns the value of attribute bike_flag.
-
#origin_time ⇒ Object
Returns the value of attribute origin_time.
-
#station ⇒ Object
Returns the value of attribute station.
Class Method Summary collapse
Instance Attribute Details
#bike_flag ⇒ Object
Returns the value of attribute bike_flag.
214 215 216 |
# File 'lib/bort/schedule.rb', line 214 def bike_flag @bike_flag end |
#origin_time ⇒ Object
Returns the value of attribute origin_time.
214 215 216 |
# File 'lib/bort/schedule.rb', line 214 def origin_time @origin_time end |
#station ⇒ Object
Returns the value of attribute station.
214 215 216 |
# File 'lib/bort/schedule.rb', line 214 def station @station end |
Class Method Details
.parse(doc, date) ⇒ Object
216 217 218 219 220 221 222 223 |
# File 'lib/bort/schedule.rb', line 216 def self.parse(doc, date) stop = Stop.new stop.station = doc.attributes['station'] stop.origin_time = Time.parse("#{date.to_s} #{doc.attributes['origtime']}") stop.bike_flag = doc.attributes['bikeflag'] == '1' stop end |