Class: DamageControl::Tracker::Bugzilla

Inherits:
Base
  • Object
show all
Defined in:
lib/damagecontrol/tracker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

classes, #htmlize, register

Methods included from Web::Configuration

#selected?, #short

Constructor Details

#initialize(url = "http://bugzilla.org/") ⇒ Bugzilla

Returns a new instance of Bugzilla.



47
48
49
# File 'lib/damagecontrol/tracker.rb', line 47

def initialize(url="http://bugzilla.org/")
  @url = url
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



45
46
47
# File 'lib/damagecontrol/tracker.rb', line 45

def url
  @url
end

Instance Method Details

#highlight(s) ⇒ Object



55
56
57
58
59
60
61
62
# File 'lib/damagecontrol/tracker.rb', line 55

def highlight(s)
  url = RSCM::PathConverter.ensure_trailing_slash(@url)
  if (url)
    htmlize(s.gsub(/#([0-9]+)/, "<a href=\"#{url}show_bug.cgi?id=\\1\">#\\1</a>"))
  else
    htmlize(s)
  end
end

#nameObject



51
52
53
# File 'lib/damagecontrol/tracker.rb', line 51

def name
  "Bugzilla"
end