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 = "http://trac.org/") ⇒ Trac
constructor
A new instance of Trac.
- #name ⇒ Object
Methods inherited from Base
Methods included from Web::Configuration
Constructor Details
#initialize(url = "http://trac.org/") ⇒ Trac
Returns a new instance of Trac.
74 75 76 |
# File 'lib/damagecontrol/tracker.rb', line 74 def initialize(url="http://trac.org/") @url = url end |
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
72 73 74 |
# File 'lib/damagecontrol/tracker.rb', line 72 def url @url end |
Instance Method Details
#highlight(s) ⇒ Object
82 83 84 85 86 87 88 89 |
# File 'lib/damagecontrol/tracker.rb', line 82 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
78 79 80 |
# File 'lib/damagecontrol/tracker.rb', line 78 def name "Trac" end |