Class: PostRunner::ActivityListView::ActivityLink
- Inherits:
-
Object
- Object
- PostRunner::ActivityListView::ActivityLink
- Defined in:
- lib/postrunner/ActivityListView.rb
Instance Method Summary collapse
-
#initialize(activity) ⇒ ActivityLink
constructor
A new instance of ActivityLink.
- #to_html(doc) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(activity) ⇒ ActivityLink
Returns a new instance of ActivityLink.
25 26 27 |
# File 'lib/postrunner/ActivityListView.rb', line 25 def initialize(activity) @activity = activity end |
Instance Method Details
#to_html(doc) ⇒ Object
29 30 31 32 |
# File 'lib/postrunner/ActivityListView.rb', line 29 def to_html(doc) doc.a(@activity.name, { :class => 'activity_link', :href => @activity.fit_file[0..-5] + '.html' }) end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/postrunner/ActivityListView.rb', line 34 def to_s @activity.name[0..19] end |