Class: DamageControl::Tracker::Trac
- Defined in:
- lib/damagecontrol/tracker.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #highlight(s) ⇒ Object
-
#initialize(url = nil) ⇒ Trac
constructor
A new instance of Trac.
- #name ⇒ Object
Methods inherited from Base
Methods included from Web::Configuration
Constructor Details
#initialize(url = nil) ⇒ Trac
Returns a new instance of Trac.
53 54 55 |
# File 'lib/damagecontrol/tracker.rb', line 53 def initialize(url=nil) @url = url end |
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
51 52 53 |
# File 'lib/damagecontrol/tracker.rb', line 51 def url @url end |
Instance Method Details
#highlight(s) ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/damagecontrol/tracker.rb', line 61 def highlight(s) url = RSCM::PathConverter.ensure_trailing_slash(@url) if (url) htmlize(s.gsub(/#([0-9]+)/, "<a href=\"#{url}/ticket/\\1\">#\\1</a>")) else htmlize(s) end end |
#name ⇒ Object
57 58 59 |
# File 'lib/damagecontrol/tracker.rb', line 57 def name "Trac" end |