Class: DamageControl::Tracker::JIRA
- Defined in:
- lib/damagecontrol/tracker.rb
Instance Attribute Summary collapse
-
#baseurl ⇒ Object
Returns the value of attribute baseurl.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
Instance Method Summary collapse
- #highlight(s) ⇒ Object
-
#initialize(baseurl = "http://jira.codehaus.org/", project_id = "") ⇒ JIRA
constructor
A new instance of JIRA.
- #name ⇒ Object
- #url ⇒ Object
Methods inherited from Base
Methods included from Web::Configuration
Constructor Details
#initialize(baseurl = "http://jira.codehaus.org/", project_id = "") ⇒ JIRA
Returns a new instance of JIRA.
101 102 103 |
# File 'lib/damagecontrol/tracker.rb', line 101 def initialize(baseurl="http://jira.codehaus.org/", project_id="") @baseurl, @project_id = baseurl, project_id end |
Instance Attribute Details
#baseurl ⇒ Object
Returns the value of attribute baseurl.
96 97 98 |
# File 'lib/damagecontrol/tracker.rb', line 96 def baseurl @baseurl end |
#project_id ⇒ Object
Returns the value of attribute project_id.
99 100 101 |
# File 'lib/damagecontrol/tracker.rb', line 99 def project_id @project_id end |
Instance Method Details
#highlight(s) ⇒ Object
113 114 115 116 117 118 119 120 |
# File 'lib/damagecontrol/tracker.rb', line 113 def highlight(s) url = RSCM::PathConverter.ensure_trailing_slash(baseurl) if(url) htmlize(s.gsub(/([A-Z]+-[0-9]+)/, "<a href=\"#{url}browse/\\1\">\\1</a>")) else htmlize(s) end end |
#name ⇒ Object
105 106 107 |
# File 'lib/damagecontrol/tracker.rb', line 105 def name "JIRA" end |
#url ⇒ Object
109 110 111 |
# File 'lib/damagecontrol/tracker.rb', line 109 def url "#{RSCM::PathConverter.ensure_trailing_slash(baseurl)}browse/#{project_id}" end |