Class: DamageControl::Tracker::Scarab
- Defined in:
- lib/damagecontrol/tracker.rb
Instance Attribute Summary collapse
-
#baseurl ⇒ Object
Returns the value of attribute baseurl.
-
#module_key ⇒ Object
Returns the value of attribute module_key.
Instance Method Summary collapse
- #highlight(s) ⇒ Object
-
#initialize(baseurl = "http://scarab.org/", module_key = "") ⇒ Scarab
constructor
A new instance of Scarab.
- #name ⇒ Object
- #url ⇒ Object
Methods inherited from Base
Methods included from Web::Configuration
Constructor Details
#initialize(baseurl = "http://scarab.org/", module_key = "") ⇒ Scarab
Returns a new instance of Scarab.
186 187 188 |
# File 'lib/damagecontrol/tracker.rb', line 186 def initialize(baseurl="http://scarab.org/", module_key="") @baseurl, @module_key = baseurl, module_key end |
Instance Attribute Details
#baseurl ⇒ Object
Returns the value of attribute baseurl.
181 182 183 |
# File 'lib/damagecontrol/tracker.rb', line 181 def baseurl @baseurl end |
#module_key ⇒ Object
Returns the value of attribute module_key.
184 185 186 |
# File 'lib/damagecontrol/tracker.rb', line 184 def module_key @module_key end |
Instance Method Details
#highlight(s) ⇒ Object
198 199 200 201 202 203 204 205 |
# File 'lib/damagecontrol/tracker.rb', line 198 def highlight(s) url = RSCM::PathConverter.ensure_trailing_slash(baseurl) if (url) htmlize(s.gsub(/(#{module_key}[0-9]+)/, "<a href=\"#{url}issues/id/\\1\">\\1</a>")) else htmlize(s) end end |
#name ⇒ Object
190 191 192 |
# File 'lib/damagecontrol/tracker.rb', line 190 def name "Scarab" end |
#url ⇒ Object
194 195 196 |
# File 'lib/damagecontrol/tracker.rb', line 194 def url baseurl end |