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 = nil, project_id = nil) ⇒ JIRA
constructor
A new instance of JIRA.
- #name ⇒ Object
- #url ⇒ Object
Methods inherited from Base
Methods included from Web::Configuration
Constructor Details
#initialize(baseurl = nil, project_id = nil) ⇒ JIRA
Returns a new instance of JIRA.
75 76 77 |
# File 'lib/damagecontrol/tracker.rb', line 75 def initialize(baseurl=nil, project_id=nil) @baseurl, @project_id = baseurl, project_id end |
Instance Attribute Details
#baseurl ⇒ Object
Returns the value of attribute baseurl.
72 73 74 |
# File 'lib/damagecontrol/tracker.rb', line 72 def baseurl @baseurl end |
#project_id ⇒ Object
Returns the value of attribute project_id.
73 74 75 |
# File 'lib/damagecontrol/tracker.rb', line 73 def project_id @project_id end |
Instance Method Details
#highlight(s) ⇒ Object
87 88 89 90 91 92 93 94 |
# File 'lib/damagecontrol/tracker.rb', line 87 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
79 80 81 |
# File 'lib/damagecontrol/tracker.rb', line 79 def name "JIRA" end |
#url ⇒ Object
83 84 85 |
# File 'lib/damagecontrol/tracker.rb', line 83 def url "#{RSCM::PathConverter.ensure_trailing_slash(baseurl)}browse/#{project_id}" end |