Class: PostRunner::EventList
- Inherits:
-
Object
- Object
- PostRunner::EventList
- Includes:
- Fit4Ruby::Converters
- Defined in:
- lib/postrunner/EventList.rb
Overview
The EventList objects can generate a table that lists all the recorded FIT file events in chronological order.
Instance Method Summary collapse
-
#initialize(activity, unit_system) ⇒ EventList
constructor
Create a DataSources object.
-
#to_html(doc) ⇒ Object
Add the list as HTML table to the specified doc.
-
#to_s ⇒ Object
Return the list as ASCII table.
Constructor Details
#initialize(activity, unit_system) ⇒ EventList
Create a DataSources object.
31 32 33 34 35 |
# File 'lib/postrunner/EventList.rb', line 31 def initialize(activity, unit_system) @activity = activity @fit_activity = activity.fit_activity @unit_system = unit_system end |
Instance Method Details
#to_html(doc) ⇒ Object
Add the list as HTML table to the specified doc.
44 45 46 |
# File 'lib/postrunner/EventList.rb', line 44 def to_html(doc) ViewFrame.new('events', 'Events', 600, list, true).to_html(doc) end |
#to_s ⇒ Object
Return the list as ASCII table
38 39 40 |
# File 'lib/postrunner/EventList.rb', line 38 def to_s list.to_s end |