Class: PostRunner::ActivityListView::ActivityLink

Inherits:
Object
  • Object
show all
Defined in:
lib/postrunner/ActivityListView.rb

Instance Method Summary collapse

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_sObject



34
35
36
# File 'lib/postrunner/ActivityListView.rb', line 34

def to_s
  @activity.name[0..19]
end