Class: DamageControl::Tracker::SourceForge
- Defined in:
- lib/damagecontrol/tracker.rb
Direct Known Subclasses
Constant Summary collapse
- PATTERN =
/#([0-9]+)/
Instance Attribute Summary collapse
-
#group_id ⇒ Object
Returns the value of attribute group_id.
-
#tracker_id ⇒ Object
Returns the value of attribute tracker_id.
Instance Method Summary collapse
- #highlight(message) ⇒ Object
-
#initialize(group_id = "", tracker_id = "") ⇒ SourceForge
constructor
A new instance of SourceForge.
- #name ⇒ Object
- #url ⇒ Object
Methods inherited from Base
Methods included from Web::Configuration
Constructor Details
#initialize(group_id = "", tracker_id = "") ⇒ SourceForge
Returns a new instance of SourceForge.
136 137 138 |
# File 'lib/damagecontrol/tracker.rb', line 136 def initialize(group_id="", tracker_id="") @group_id, @tracker_id = group_id, tracker_id end |
Instance Attribute Details
#group_id ⇒ Object
Returns the value of attribute group_id.
130 131 132 |
# File 'lib/damagecontrol/tracker.rb', line 130 def group_id @group_id end |
#tracker_id ⇒ Object
Returns the value of attribute tracker_id.
134 135 136 |
# File 'lib/damagecontrol/tracker.rb', line 134 def tracker_id @tracker_id end |
Instance Method Details
#highlight(message) ⇒ Object
148 149 150 |
# File 'lib/damagecontrol/tracker.rb', line 148 def highlight() htmlize(.gsub(PATTERN,"<a href=\"http://sourceforge.net/tracker/index.php?func=detail&aid=\\1&group_id=#{group_id}&atid=#{tracker_id}\">#\\1</a>")) end |
#name ⇒ Object
140 141 142 |
# File 'lib/damagecontrol/tracker.rb', line 140 def name "SourceForge" end |
#url ⇒ Object
144 145 146 |
# File 'lib/damagecontrol/tracker.rb', line 144 def url "http://sourceforge.net/tracker/?group_id=#{group_id}" end |