Class: F1Results::RaceResult
Instance Attribute Summary collapse
-
#points ⇒ Object
Returns the value of attribute points.
-
#retired ⇒ Object
Returns the value of attribute retired.
Attributes inherited from Result
#driver, #driver_country_abbr, #driver_number, #gap, #laps, #position, #position_name, #team, #time
Instance Method Summary collapse
- #time_or_retired ⇒ Object
- #time_or_retired=(str) ⇒ Object (also: #time_retired=)
- #to_a ⇒ Object
Methods inherited from Result
Constructor Details
This class inherits a constructor from F1Results::Result
Instance Attribute Details
#points ⇒ Object
Returns the value of attribute points.
68 69 70 |
# File 'lib/f1results/result.rb', line 68 def points @points end |
#retired ⇒ Object
Returns the value of attribute retired.
68 69 70 |
# File 'lib/f1results/result.rb', line 68 def retired @retired end |
Instance Method Details
#time_or_retired ⇒ Object
85 86 87 |
# File 'lib/f1results/result.rb', line 85 def time_or_retired time || retired end |
#time_or_retired=(str) ⇒ Object Also known as: time_retired=
76 77 78 79 80 81 82 |
# File 'lib/f1results/result.rb', line 76 def time_or_retired=(str) if /^[0-9]|\+/ =~ str @time = str else @retired = str end end |
#to_a ⇒ Object
72 73 74 |
# File 'lib/f1results/result.rb', line 72 def to_a [position_name, driver_number, driver, team, laps, time_or_retired, points] end |